Merge from Chromium at DEPS revision r207203

This commit was generated by merge_to_master.py.

Change-Id: Ia8a6c2a997232c94108d8937f8c2556f42be1c37
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index 58c07b0..7cb3e25 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -234,18 +234,17 @@
         summarized_failing_results = test_run_results.summarize_results(self._port, self._expectations, initial_results, retry_results, enabled_pixel_tests_in_retry, only_include_failing=True)
         self._printer.print_results(end_time - start_time, initial_results, summarized_failing_results)
 
+        exit_code = self._port.exit_code_from_summarized_results(summarized_failing_results)
         if not self._options.dry_run:
             self._write_json_files(summarized_full_results, summarized_failing_results, initial_results)
             self._upload_json_files()
 
             results_path = self._filesystem.join(self._results_directory, "results.html")
             self._copy_results_html_file(results_path)
-            if self._options.show_results and (initial_results.unexpected_results_by_name or
-                                               (self._options.full_results_html and initial_results.total_failures)):
+            if self._options.show_results and (exit_code or (self._options.full_results_html and initial_results.total_failures)):
                 self._port.show_results_html_file(results_path)
 
-        return test_run_results.RunDetails(self._port.exit_code_from_summarized_results(summarized_failing_results),
-                                           summarized_full_results, summarized_failing_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
+        return test_run_results.RunDetails(exit_code, summarized_full_results, summarized_failing_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
 
     def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, num_workers, retrying):
         needs_http = self._port.requires_http_server() or any(self._is_http_test(test) for test in tests_to_run)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
index 5e0cd04..49b36e4 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
@@ -284,7 +284,7 @@
 
 
         # 4) Substitute specifier subsets that match macros witin each set:
-        #   (xp, vista, win7, release) -> (win, release)
+        #   (xp, win7, release) -> (win, release)
         self.collapse_macros(self._configuration_macros, specifiers_list)
 
         macro_keys = set(self._configuration_macros.keys())
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 3d9e3cf..f3acf04 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -220,7 +220,7 @@
     # FIXME: Update the original modifiers and remove this once the old syntax is gone.
     _configuration_tokens_list = [
         'Mac', 'SnowLeopard', 'Lion', 'MountainLion',
-        'Win', 'XP', 'Vista', 'Win7',
+        'Win', 'XP', 'Win7',
         'Linux',
         'Android',
         'Release',
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 5c5972f..ccfa341 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -361,7 +361,6 @@
 
     def test_config_modifiers(self):
         self.assert_tokenize_exp('[ Mac ] foo.html', modifiers=['MAC', 'SKIP'], expectations=['PASS'])
-        self.assert_tokenize_exp('[ Mac Vista ] foo.html', modifiers=['MAC', 'VISTA', 'SKIP'], expectations=['PASS'])
         self.assert_tokenize_exp('[ Mac ] foo.html [ Failure ] ', modifiers=['MAC'], expectations=['FAIL'])
 
     def test_unknown_config(self):
@@ -504,7 +503,7 @@
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
 
-        self.assertEqual("""Bug(x) [ Linux Vista Win7 Release ] failures/expected/foo.html [ Failure ]
+        self.assertEqual("""Bug(x) [ Linux Win7 Release ] failures/expected/foo.html [ Failure ]
 Bug(y) [ Win Mac Debug ] failures/expected/foo.html [ Crash ]
 """, actual_expectations)
 
@@ -521,7 +520,6 @@
         expectations = TestExpectations(test_port)
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
-        actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-vista', None).test_configuration())
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-win7', None).test_configuration())
 
         self.assertEqual("""Bug(y) [ Win Debug ] failures/expected/foo.html [ Crash ]
@@ -540,7 +538,6 @@
         expectations = TestExpectations(test_port)
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
-        actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-vista', None).test_configuration())
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-win7', None).test_configuration())
 
         self.assertEqual("""Bug(x) [ Win Debug ] failures/expected/foo.html [ Failure Timeout ]
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
index 5d78c60..7d54d2a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
@@ -258,8 +258,6 @@
     # FIXME: Remove this. It is redundant with results['num_failures_by_type'].
     results['num_missing'] = num_missing
     results['num_regressions'] = num_regressions
-    # FIXME: This is always true for Blink. We should remove this and update the code in Layouts/fast/harness/results.html that uses this.
-    results['uses_expectations_file'] = port_obj.uses_test_expectations_file()
     results['interrupted'] = initial_results.interrupted  # Does results.html have enough information to compute this itself? (by checking total number of results vs. total number of tests?)
     results['layout_tests_dir'] = port_obj.layout_tests_dir()
     results['has_wdiff'] = port_obj.wdiff_available()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index 786f2c7..0b56ba2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -186,7 +186,7 @@
     def command_line_file(self):
         return '/data/local/tmp/content-shell-command-line'
     def additional_command_line_flags(self):
-        return []
+        return ['--dump-render-tree']
     def device_directory(self):
         return DEVICE_SOURCE_ROOT_DIR + 'content_shell/'
 
@@ -211,6 +211,11 @@
     def pull(self, device_path, host_path, ignore_error=False):
         return self.run(['pull', device_path, host_path], ignore_error=ignore_error)
 
+    def mkdir(self, device_path, chmod=None):
+        self.run(['shell', 'mkdir', '-p', device_path])
+        if chmod:
+            self.run(['shell', 'chmod', chmod, device_path])
+
     def restart_as_root(self):
         output = self.run(['root'])
         if 'adbd is already running as root' in output:
@@ -354,9 +359,11 @@
 
     def additional_drt_flag(self):
         # Chromium for Android always uses the hardware GPU path.
-        return ['--encode-binary', '--enable-hardware-gpu',
-                '--force-compositing-mode',
-                '--enable-accelerated-fixed-position']
+        flags = ['--encode-binary', '--enable-hardware-gpu',
+                 '--force-compositing-mode',
+                 '--enable-accelerated-fixed-position']
+        flags += self._driver_details.additional_command_line_flags()
+        return flags
 
     def default_timeout_ms(self):
         # Android platform has less computing power than desktop platforms.
@@ -708,15 +715,14 @@
 
         # Required by webkit_support::GetWebKitRootDirFilePath().
         # Other directories will be created automatically by adb push.
-        self._android_commands.run(['shell', 'mkdir', '-p', DEVICE_SOURCE_ROOT_DIR + 'chrome'])
+        self._android_commands.mkdir(DEVICE_SOURCE_ROOT_DIR + 'chrome')
 
-        # Allow the test driver to get full read and write access to the directory.
-        # The native code needs the permission to write temporary files and create pipes here.
-        self._android_commands.run(['shell', 'mkdir', '-p', self._driver_details.device_directory()])
-        self._android_commands.run(['shell', 'chmod', '777', self._driver_details.device_directory()])
+        # Allow the test driver to get full read and write access to the directory on the device,
+        # as well as for the FIFOs. We'll need a world writable directory.
+        self._android_commands.mkdir(self._driver_details.device_directory(), chmod='777')
+        self._android_commands.mkdir(self._driver_details.device_fifo_directory(), chmod='777')
 
-        # Delete the disk cache if any to ensure a clean test run.
-        # This is like what's done in ChromiumPort.setup_test_run but on the device.
+        # Make sure that the disk cache on the device resets to a clean state.
         self._android_commands.run(['shell', 'rm', '-r', self._driver_details.device_cache_directory()])
 
     def _log_error(self, message):
@@ -837,7 +843,7 @@
         return self._android_commands.adb_command() + ['shell']
 
     def _android_driver_cmd_line(self, pixel_tests, per_test_args):
-        return driver.Driver.cmd_line(self, pixel_tests, per_test_args) + self._driver_details.additional_command_line_flags()
+        return driver.Driver.cmd_line(self, pixel_tests, per_test_args)
 
     @staticmethod
     def _loop_with_timeout(condition, timeout_secs):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index 0c9e946..68922e8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -351,7 +351,7 @@
     ALL_BASELINE_VARIANTS = (
         'test-linux-x86_64',
         'test-mac-snowleopard', 'test-mac-leopard',
-        'test-win-vista', 'test-win-win7', 'test-win-xp',
+        'test-win-win7', 'test-win-xp',
     )
 
     @classmethod
@@ -376,7 +376,6 @@
         version_map = {
             'test-win-xp': 'xp',
             'test-win-win7': 'win7',
-            'test-win-vista': 'vista',
             'test-mac-leopard': 'leopard',
             'test-mac-snowleopard': 'snowleopard',
             'test-linux-x86_64': 'lucid',
@@ -399,8 +398,7 @@
             'test-mac-snowleopard': ['test-mac-snowleopard'],
             'test-mac-leopard': ['test-mac-leopard', 'test-mac-snowleopard'],
             'test-win-win7': ['test-win-win7'],
-            'test-win-vista': ['test-win-vista', 'test-win-win7'],
-            'test-win-xp': ['test-win-xp', 'test-win-vista', 'test-win-win7'],
+            'test-win-xp': ['test-win-xp', 'test-win-win7'],
             'test-linux-x86_64': ['test-linux-x86_64', 'test-win-win7'],
         }
         return [self._webkit_baseline_path(d) for d in search_paths[self.name()]]
@@ -517,7 +515,6 @@
         return (('leopard', 'x86'),
                 ('snowleopard', 'x86'),
                 ('xp', 'x86'),
-                ('vista', 'x86'),
                 ('win7', 'x86'),
                 ('lucid', 'x86'),
                 ('lucid', 'x86_64'))
@@ -527,7 +524,7 @@
 
     def configuration_specifier_macros(self):
         """To avoid surprises when introducing new macros, these are intentionally fixed in time."""
-        return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'vista', 'win7'], 'linux': ['lucid']}
+        return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'win7'], 'linux': ['lucid']}
 
     def all_baseline_variants(self):
         return self.ALL_BASELINE_VARIANTS
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
index b6affa5..bcc593d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
@@ -280,9 +280,10 @@
                 ['--child-processes', '2', '--force', 'failures/expected/exception.html', 'passes/text.html'], tests_included=True, shared_port=False)
 
     def test_full_results_html(self):
-        # FIXME: verify html?
-        details, _, _ = logging_run(['--full-results-html'])
+        host = MockHost()
+        details, _, _ = logging_run(['--full-results-html'], host=host)
         self.assertEqual(details.exit_code, 0)
+        self.assertEqual(len(host.user.opened_urls), 1)
 
     def test_hung_thread(self):
         details, err, _ = logging_run(['--run-singly', '--time-out-ms=50', 'failures/expected/hang.html'], tests_included=True)
@@ -641,6 +642,7 @@
         self.assertTrue('Retrying' in err.getvalue())
         self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
         self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/retries/failures/flaky/text-actual.txt'))
+        self.assertEqual(len(host.user.opened_urls), 0)
 
         # Now we test that --clobber-old-results does remove the old entries and the old retries,
         # and that we don't retry again.
@@ -651,6 +653,7 @@
         self.assertTrue('flaky/text.html' in err.getvalue())
         self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
         self.assertFalse(host.filesystem.exists('retries'))
+        self.assertEqual(len(host.user.opened_urls), 1)
 
     def test_retrying_chrashed_tests(self):
         host = MockHost()