Add presubmit to run `{dm,nanobench}_flags.py test` when changed.

BUG=skia:

Review URL: https://codereview.chromium.org/1129443005
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 60439d6..6d429df 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -140,6 +140,17 @@
   return results
 
 
+def _ToolFlags(input_api, output_api):
+  """Make sure `{dm,nanobench}_flags.py test` passes if modified."""
+  results = []
+  sources = lambda x: ('dm_flags.py'        in x.LocalPath() or
+                       'nanobench_flags.py' in x.LocalPath())
+  for f in input_api.AffectedSourceFiles(sources):
+    if 0 != subprocess.call(['python', f.LocalPath(), 'test']):
+      results.append(output_api.PresubmitError('`python %s test` failed' % f))
+  return results
+
+
 def _CommonChecks(input_api, output_api):
   """Presubmit checks common to upload and commit."""
   results = []
@@ -161,6 +172,7 @@
   results.extend(_IfDefChecks(input_api, output_api))
   results.extend(_CopyrightChecks(input_api, output_api,
                                   source_file_filter=sources))
+  results.extend(_ToolFlags(input_api, output_api))
   return results
 
 
diff --git a/tools/dm_flags.json b/tools/dm_flags.json
index c648408..6cd63e3 100644
--- a/tools/dm_flags.json
+++ b/tools/dm_flags.json
@@ -1,4 +1,158 @@
 {
+  "Pretend-iOS-Bot": [
+    "--config", 
+    "565", 
+    "8888", 
+    "gpu", 
+    "pdf", 
+    "serialize-8888", 
+    "tiles_rt-8888", 
+    "pipe-8888", 
+    "tiles_rt-gpu", 
+    "--blacklist", 
+    "gpu", 
+    "_", 
+    "_", 
+    "PANO_20121023_214540.jpg", 
+    "msaa", 
+    "_", 
+    "_", 
+    "PANO_20121023_214540.jpg", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8os2v2.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8v4.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8v5.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb16-565.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb16-565pal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb32-111110.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb32bf.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgba32.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgba32abf.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb24largepal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8os2v2-16.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8oversizepal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal4rletrns.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8rletrns.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "4bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "8bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "24bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "32bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "rgb24largepal.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "pal8os2v2-16.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "pal8oversizepal.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "4bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "8bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "24bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "32bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "Hopstarter-Mac-Folders-Apple.ico", 
+    "gpu", 
+    "skp", 
+    "_", 
+    "_", 
+    "msaa", 
+    "skp", 
+    "_", 
+    "_", 
+    "gpu", 
+    "image", 
+    "decode", 
+    "_", 
+    "msaa", 
+    "image", 
+    "decode", 
+    "_", 
+    "gpu", 
+    "image", 
+    "subset", 
+    "_", 
+    "msaa", 
+    "image", 
+    "subset", 
+    "_", 
+    "msaa16", 
+    "gm", 
+    "_", 
+    "tilemodesProcess", 
+    "--match", 
+    "~WritePixels"
+  ], 
   "Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug": [
     "--config", 
     "565", 
@@ -153,6 +307,162 @@
     "~tabl_mozilla_0", 
     "~desk_yahoonews_0"
   ], 
+  "Test-Android-GCC-GalaxyS4-GPU-SGX544-Arm7-Release": [
+    "--config", 
+    "565", 
+    "8888", 
+    "gpu", 
+    "serialize-8888", 
+    "tiles_rt-8888", 
+    "pipe-8888", 
+    "tiles_rt-gpu", 
+    "--threads", 
+    "0", 
+    "--blacklist", 
+    "gpu", 
+    "_", 
+    "_", 
+    "PANO_20121023_214540.jpg", 
+    "msaa", 
+    "_", 
+    "_", 
+    "PANO_20121023_214540.jpg", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8os2v2.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8v4.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8v5.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb16-565.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb16-565pal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb32-111110.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb32bf.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgba32.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgba32abf.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "rgb24largepal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8os2v2-16.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8oversizepal.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal4rletrns.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "pal8rletrns.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "4bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "8bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "24bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "32bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "rgb24largepal.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "pal8os2v2-16.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "pal8oversizepal.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "4bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "8bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "24bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "subset", 
+    "32bpp-pixeldata-cropped.bmp", 
+    "_", 
+    "image", 
+    "decode", 
+    "Hopstarter-Mac-Folders-Apple.ico", 
+    "gpu", 
+    "skp", 
+    "_", 
+    "_", 
+    "msaa", 
+    "skp", 
+    "_", 
+    "_", 
+    "gpu", 
+    "image", 
+    "decode", 
+    "_", 
+    "msaa", 
+    "image", 
+    "decode", 
+    "_", 
+    "gpu", 
+    "image", 
+    "subset", 
+    "_", 
+    "msaa", 
+    "image", 
+    "subset", 
+    "_", 
+    "tiles_rt-gpu", 
+    "gm", 
+    "_", 
+    "imagefilterscropped", 
+    "--match", 
+    "~tabl_mozilla_0", 
+    "~desk_yahoonews_0"
+  ], 
   "Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release": [
     "--config", 
     "565", 
diff --git a/tools/dm_flags.py b/tools/dm_flags.py
index 817c38b..4f700a3 100755
--- a/tools/dm_flags.py
+++ b/tools/dm_flags.py
@@ -174,8 +174,10 @@
   import coverage  # This way the bots don't need coverage.py to be installed.
   args = {}
   cases = [
+    'Pretend-iOS-Bot',
     'Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Debug',
     'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug',
+    'Test-Android-GCC-GalaxyS4-GPU-SGX544-Arm7-Release',
     'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release',
     'Test-Android-GCC-NexusPlayer-CPU-SSSE3-x86-Release',
     'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
diff --git a/tools/nanobench_flags.json b/tools/nanobench_flags.json
index 28d7b09..e90f217 100644
--- a/tools/nanobench_flags.json
+++ b/tools/nanobench_flags.json
@@ -1,4 +1,21 @@
 {
+  "Perf-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Release": [
+    "--scales", 
+    "1.0", 
+    "1.1", 
+    "--config", 
+    "565", 
+    "8888", 
+    "gpu", 
+    "nonrendering", 
+    "angle", 
+    "hwui", 
+    "--match", 
+    "~blurroundrect", 
+    "~patch_grid", 
+    "~desk_carsvg", 
+    "~desk_unicodetable"
+  ], 
   "Perf-Android-Nexus7-Tegra3-Arm7-Release": [
     "--scales", 
     "1.0",