[webkitpy] Remove chromium ports.
authorglenn@skynav.com <glenn@skynav.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Apr 2013 04:59:35 +0000 (04:59 +0000)
committerglenn@skynav.com <glenn@skynav.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Apr 2013 04:59:35 +0000 (04:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114326

Reviewed by Dirk Pranke.

As a side effect, also:

- remove chromium builders from webkitpy.layout_tests.port.builders
- remove chromium builders from rebaseline
- rewrite chromium dependent tests in rebaseline_unittest
- remove chromium platform from garden-o-matic
- select apple platform as default platform in garden-o-matic
- remove chromium port dependencies from a few other tests (run_webkit_tests_integrationtest, factory_unittest, style.checkers.test_expectations_unittest)

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
* Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
(BaselineOptimizerTest.test_move_baselines):
(BaselineOptimizerTest.test_efl):
(BaselineOptimizerTest.test_no_add_mac_future):
(BaselineOptimizerTest.test_win_does_not_drop_to_win_7sp0):
(BaselineOptimizerTest.test_common_directory_includes_root):
(BaselineOptimizerTest.test_complex_shadowing):
(BaselineOptimizerTest.test_virtual_ports_filtered):
* Scripts/webkitpy/layout_tests/port/builders.py:
* Scripts/webkitpy/layout_tests/port/chromium.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_android.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_linux.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_mac.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_win.py: Removed.
* Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py: Removed.
* Scripts/webkitpy/layout_tests/port/factory.py:
(platform_options):
(PortFactory):
* Scripts/webkitpy/layout_tests/port/factory_unittest.py:
(FactoryTest.test_qt):
(FactoryTest.test_get_from_builder_name):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_build_check):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(Rebaseline._builders_to_pull_from):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(_BaseTestCase):
(_BaseTestCase.setUp):
(TestRebaselineTest.setUp):
(TestRebaselineTest.test_baseline_directory):
(test_rebaseline_updates_expectations_file):
(test_rebaseline_does_not_include_overrides):
(test_rebaseline_test):
(test_rebaseline_test_and_print_scm_changes):
(test_rebaseline_and_copy_test):
(test_rebaseline_and_copy_test_no_existing_result):
(test_rebaseline_and_copy_test_with_lion_result):
(test_rebaseline_and_copy_no_overwrite_test):
(TestRebaselineExpectations.test_rebaseline_expectations):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/builders.py
Tools/Scripts/webkitpy/layout_tests/port/chromium.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/port/factory.py
Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
Tools/Scripts/webkitpy/tool/commands/rebaseline.py
Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

index 24b0607..7c10f75 100644 (file)
@@ -32,10 +32,10 @@ James, a web developer from Birmingham, UK.
                                          script-src 'self' file: https://ajax.googleapis.com;
                                          style-src 'self' 'unsafe-inline' file: https://ajax.googleapis.com http://fonts.googleapis.com;
                                          font-src http://themes.googleusercontent.com;
-                                         img-src 'self' https://ajax.googleapis.com http://build.chromium.org http://build.webkit.org;
-                                         media-src 'self' http://build.chromium.org http://build.webkit.org;
-                                         frame-src 'self' http://build.chromium.org http://build.webkit.org http://test-results.appspot.com;
-                                         connect-src 'self' http://trac.webkit.org http://build.chromium.org http://build.webkit.org">
+                                         img-src 'self' https://ajax.googleapis.com http://build.webkit.org;
+                                         media-src 'self' http://build.webkit.org;
+                                         frame-src 'self' http://build.webkit.org http://test-results.appspot.com;
+                                         connect-src 'self' http://trac.webkit.org http://build.webkit.org">
 <title>Garden-O-Matic</title>
 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700">
 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/themes/base/jquery-ui.css">
index 8087056..14cf7c3 100644 (file)
@@ -60,48 +60,6 @@ config.kPlatforms = {
             return builderName.indexOf('Apple') != -1;
         },
     },
-    'chromium' : {
-        label : 'Chromium',
-        buildConsoleURL: 'http://build.chromium.org/p/chromium.webkit',
-        layoutTestResultsURL: 'http://build.chromium.org/f/chromium/layout_test_results',
-        waterfallURL: 'http://build.chromium.org/p/chromium.webkit/waterfall',
-        builders: {
-            'WebKit XP': {version: 'xp'},
-            'WebKit Win7': {version: 'win7'},
-            'WebKit Win7 (dbg)(1)': {version: 'win7', debug: true},
-            'WebKit Win7 (dbg)(2)': {version: 'win7', debug: true},
-            'WebKit Linux': {version: 'lucid', is64bit: true},
-            'WebKit Linux 32': {version: 'lucid'},
-            'WebKit Linux (dbg)': {version: 'lucid', is64bit: true, debug: true},
-            'WebKit Mac10.6': {version: 'snowleopard'},
-            'WebKit Mac10.6 (dbg)': {version: 'snowleopard', debug: true},
-            'WebKit Mac10.7': {version: 'lion'},
-            'WebKit Mac10.7 (dbg)': {version: 'lion', debug: true},
-            'WebKit Mac10.8': {version: 'mountainlion'},
-        },
-        haveBuilderAccumulatedResults : true,
-        useDirectoryListingForOldBuilds: true,
-        useFlakinessDashboard: true,
-        resultsDirectoryNameFromBuilderName: function(builderName) {
-            return base.underscoredBuilderName(builderName);
-        },
-        resultsDirectoryForBuildNumber: function(buildNumber, revision) {
-            return buildNumber;
-        },
-        _builderApplies: function(builderName) {
-            // FIXME: Should garden-o-matic show these? I can imagine showing the deps bots being useful at least so
-            // that the gardener only need to look at garden-o-matic and never at the waterfall. Not really sure who
-            // watches the GPU bots.
-            // The 10.8 Tests bot is really an FYI bot at this point
-            // WebKit Android doesn't upload its results yet.
-            return builderName.indexOf('GPU') == -1 &&
-                   builderName.indexOf('deps') == -1 &&
-                   builderName.indexOf('ASAN') == -1 &&
-                   builderName.indexOf('WebKit (Content Shell) Android') == -1 &&
-                   builderName.indexOf('Mac10.8 Tests') == -1 &&
-                   builderName.indexOf('WebKit Android') == -1;
-        },
-    },
     'gtk' : {
         label : 'GTK',
         buildConsoleURL: 'http://build.webkit.org',
@@ -187,7 +145,7 @@ config.kRelativeTimeUpdateFrequency = 1000 * 60;
 
 config.kExperimentalFeatures = window.location.search.search('enableExperiments=1') != -1;
 
-config.currentPlatform = base.getURLParameter('platform') || 'chromium';
+config.currentPlatform = base.getURLParameter('platform') || 'apple';
 
 // FIXME: We should add a way to restrict the results to a subset of the builders
 // (or maybe just a single builder) in the UI as well as via an URL parameter.
index 382277c..eb20f74 100644 (file)
@@ -1,3 +1,68 @@
+2013-04-09  Glenn Adams  <glenn@skynav.com>
+
+        [webkitpy] Remove chromium ports.
+        https://bugs.webkit.org/show_bug.cgi?id=114326
+
+        Reviewed by Dirk Pranke.
+
+        As a side effect, also:
+
+        - remove chromium builders from webkitpy.layout_tests.port.builders
+        - remove chromium builders from rebaseline
+        - rewrite chromium dependent tests in rebaseline_unittest
+        - remove chromium platform from garden-o-matic
+        - select apple platform as default platform in garden-o-matic
+        - remove chromium port dependencies from a few other tests (run_webkit_tests_integrationtest, factory_unittest, style.checkers.test_expectations_unittest)
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+        * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+        (BaselineOptimizerTest.test_move_baselines):
+        (BaselineOptimizerTest.test_efl):
+        (BaselineOptimizerTest.test_no_add_mac_future):
+        (BaselineOptimizerTest.test_win_does_not_drop_to_win_7sp0):
+        (BaselineOptimizerTest.test_common_directory_includes_root):
+        (BaselineOptimizerTest.test_complex_shadowing):
+        (BaselineOptimizerTest.test_virtual_ports_filtered):
+        * Scripts/webkitpy/layout_tests/port/builders.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_android.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/factory.py:
+        (platform_options):
+        (PortFactory):
+        * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+        (FactoryTest.test_qt):
+        (FactoryTest.test_get_from_builder_name):
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+        (RunTest.test_build_check):
+        * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+        (TestExpectationsTestCase.test_determine_port_from_expectations_path):
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        (Rebaseline._builders_to_pull_from):
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (_BaseTestCase):
+        (_BaseTestCase.setUp):
+        (TestRebaselineTest.setUp):
+        (TestRebaselineTest.test_baseline_directory):
+        (test_rebaseline_updates_expectations_file):
+        (test_rebaseline_does_not_include_overrides):
+        (test_rebaseline_test):
+        (test_rebaseline_test_and_print_scm_changes):
+        (test_rebaseline_and_copy_test):
+        (test_rebaseline_and_copy_test_no_existing_result):
+        (test_rebaseline_and_copy_test_with_lion_result):
+        (test_rebaseline_and_copy_no_overwrite_test):
+        (TestRebaselineExpectations.test_rebaseline_expectations):
+
 2013-04-09  Ryosuke Niwa  <rniwa@webkit.org>
 
         newcommitbot (WKR) requires a subversion checkout
index 308fc17..dcd649a 100644 (file)
@@ -61,26 +61,18 @@ class BaselineOptimizerTest(unittest.TestCase):
 
     def test_move_baselines(self):
         host = MockHost()
-        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-win/another/test-expected.txt', 'result A')
-        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-mac/another/test-expected.txt', 'result A')
-        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt', 'result B')
+        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion/another/test-expected.txt', 'result A')
+        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion-wk2/another/test-expected.txt', 'result A')
+        host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt', 'result B')
         baseline_optimizer = BaselineOptimizer(host, host.port_factory.all_port_names())
         baseline_optimizer._move_baselines('another/test-expected.txt', {
-            'LayoutTests/platform/chromium-win': 'aaa',
-            'LayoutTests/platform/chromium-mac': 'aaa',
-            'LayoutTests/platform/chromium': 'bbb',
+            'LayoutTests/platform/mac-lion': 'aaa',
+            'LayoutTests/platform/mac-lion-wk2': 'aaa',
+            'LayoutTests/platform/mac': 'bbb',
         }, {
-            'LayoutTests/platform/chromium': 'aaa',
-        })
-        self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt'), 'result A')
-
-    def test_chromium_linux_redundant_with_win(self):
-        self._assertOptimization({
-            'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
-            'LayoutTests/platform/chromium-linux': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
-        }, {
-            'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
+            'LayoutTests/platform/mac': 'aaa',
         })
+        self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt'), 'result A')
 
     def test_efl(self):
         self._assertOptimization({
@@ -89,27 +81,15 @@ class BaselineOptimizerTest(unittest.TestCase):
             'LayoutTests/platform/efl': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
         })
 
-
     def test_no_add_mac_future(self):
         self._assertOptimization({
             'LayoutTests/platform/mac': '29a1715a6470d5dd9486a142f609708de84cdac8',
             'LayoutTests/platform/win-xp': '453e67177a75b2e79905154ece0efba6e5bfb65d',
             'LayoutTests/platform/mac-lion': 'c43eaeb358f49d5e835236ae23b7e49d7f2b089f',
-            'LayoutTests/platform/chromium-mac': 'a9ba153c700a94ae1b206d8e4a75a621a89b4554',
         }, {
             'LayoutTests/platform/mac': '29a1715a6470d5dd9486a142f609708de84cdac8',
             'LayoutTests/platform/win-xp': '453e67177a75b2e79905154ece0efba6e5bfb65d',
             'LayoutTests/platform/mac-lion': 'c43eaeb358f49d5e835236ae23b7e49d7f2b089f',
-            'LayoutTests/platform/chromium-mac': 'a9ba153c700a94ae1b206d8e4a75a621a89b4554',
-        })
-
-    def test_chromium_covers_mac_win_linux(self):
-        self._assertOptimization({
-            'LayoutTests/platform/chromium-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
-            'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
-            'LayoutTests/platform/chromium-linux': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
-        }, {
-            'LayoutTests/platform/chromium': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
         })
 
     def test_mac_future(self):
@@ -132,13 +112,11 @@ class BaselineOptimizerTest(unittest.TestCase):
             'LayoutTests/platform/mac': '2',
             'LayoutTests/platform/gtk': '3',
             'LayoutTests/platform/qt': '4',
-            'LayoutTests/platform/chromium': '5',
         }, {
             'LayoutTests/platform/win': '1',
             'LayoutTests/platform/mac': '2',
             'LayoutTests/platform/gtk': '3',
             'LayoutTests/platform/qt': '4',
-            'LayoutTests/platform/chromium': '5',
         })
 
     def test_common_directory_includes_root(self):
@@ -147,17 +125,12 @@ class BaselineOptimizerTest(unittest.TestCase):
         self._assertOptimizationFailed({
             'LayoutTests/platform/gtk': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
             'LayoutTests/platform/qt': 'bcbd457d545986b7abf1221655d722363079ac87',
-            'LayoutTests/platform/chromium-win': '3764ac11e1f9fbadd87a90a2e40278319190a0d3',
             'LayoutTests/platform/mac': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
         })
 
         self._assertOptimization({
-            'LayoutTests/platform/chromium-win': '23a30302a6910f8a48b1007fa36f3e3158341834',
             'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
-            'LayoutTests/platform/chromium-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
-            'LayoutTests/platform/chromium': '1',
         }, {
-            'LayoutTests/platform/chromium': '23a30302a6910f8a48b1007fa36f3e3158341834',
             'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
         })
 
@@ -167,35 +140,22 @@ class BaselineOptimizerTest(unittest.TestCase):
         if sys.platform == 'win32':
             return
         self._assertOptimization({
-            'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
             'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
-            'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
             'LayoutTests/platform/mac-lion': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
-            'LayoutTests/platform/chromium-win': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
             'LayoutTests/platform/win-xp': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
-            'LayoutTests/platform/chromium-linux': 'f52fcdde9e4be8bd5142171cd859230bd4471036',
         }, {
-            'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
             'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
-            'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
             'LayoutTests/platform/mac-lion': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
-            'LayoutTests/platform/chromium-win': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
             'LayoutTests/platform/win-xp': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
-            'LayoutTests/platform/chromium-linux': 'f52fcdde9e4be8bd5142171cd859230bd4471036'
         })
 
     def test_virtual_ports_filtered(self):
         self._assertOptimization({
-            'LayoutTests/platform/chromium-mac': '1',
-            'LayoutTests/platform/chromium-mac-snowleopard': '1',
-            'LayoutTests/platform/chromium-win': '2',
             'LayoutTests/platform/gtk': '3',
             'LayoutTests/platform/efl': '3',
             'LayoutTests/platform/qt': '4',
             'LayoutTests/platform/mac': '5',
         }, {
-            'LayoutTests/platform/chromium-mac': '1',
-            'LayoutTests/platform/chromium-win': '2',
             'LayoutTests': '3',
             'LayoutTests/platform/qt': '4',
             'LayoutTests/platform/mac': '5',
index cdc9e5b..cb0f3e5 100644 (file)
@@ -45,20 +45,6 @@ from webkitpy.common.memoized import memoized
 #      results into platform/mac temporarily.
 
 _exact_matches = {
-    # These builders are on build.chromium.org.
-    "WebKit XP": {"port_name": "chromium-win-xp", "is_debug": False},
-    "WebKit Win7": {"port_name": "chromium-win-win7", "is_debug": False},
-    "WebKit Win7 (dbg)(1)": {"port_name": "chromium-win-win7", "is_debug": True},
-    "WebKit Win7 (dbg)(2)": {"port_name": "chromium-win-win7", "is_debug": True},
-    "WebKit Linux": {"port_name": "chromium-linux-x86_64", "is_debug": False},
-    "WebKit Linux 32": {"port_name": "chromium-linux-x86", "is_debug": False},
-    "WebKit Linux (dbg)": {"port_name": "chromium-linux-x86_64", "is_debug": True},
-    "WebKit Mac10.6": {"port_name": "chromium-mac-snowleopard", "is_debug": False},
-    "WebKit Mac10.6 (dbg)": {"port_name": "chromium-mac-snowleopard", "is_debug": True},
-    "WebKit Mac10.7": {"port_name": "chromium-mac-lion", "is_debug": False},
-    "WebKit Mac10.7 (dbg)": {"port_name": "chromium-mac-lion", "is_debug": True},
-    "WebKit Mac10.8": {"port_name": "chromium-mac-mountainlion", "is_debug": False},
-
     # These builders are on build.webkit.org.
     "Apple MountainLion Release WK1 (Tests)": {"port_name": "mac-mountainlion", "is_debug": False, "rebaseline_override_dir": "mac"},
     "Apple MountainLion Debug WK1 (Tests)": {"port_name": "mac-mountainlion", "is_debug": True, "rebaseline_override_dir": "mac"},
@@ -94,9 +80,6 @@ _fuzzy_matches = {
     r"Windows": "win",
     r"GTK": "gtk",
     r"Qt": "qt",
-    r"Chromium Mac": "chromium-mac",
-    r"Chromium Linux": "chromium-linux",
-    r"Chromium Win": "chromium-win",
 }
 
 
@@ -104,8 +87,6 @@ _ports_without_builders = [
     "qt-mac",
     "qt-win",
     "qt-wk2",
-    # FIXME: Move to _extact_matches.
-    "chromium-android",
 ]
 
 
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
deleted file mode 100644 (file)
index aa4d30c..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Chromium implementations of the Port interface."""
-
-import base64
-import errno
-import logging
-import re
-import signal
-import subprocess
-import sys
-import time
-
-from webkitpy.common.system import executive
-from webkitpy.common.system.path import cygpath
-from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port.base import Port, VirtualTestSuite
-from webkitpy.layout_tests.port.http_lock import HttpLock
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumPort(Port):
-    """Abstract base class for Chromium implementations of the Port class."""
-
-    ALL_SYSTEMS = (
-        ('snowleopard', 'x86'),
-        ('lion', 'x86'),
-        ('mountainlion', 'x86'),
-        ('xp', 'x86'),
-        ('win7', 'x86'),
-        ('lucid', 'x86'),
-        ('lucid', 'x86_64'),
-        # FIXME: Technically this should be 'arm', but adding a third architecture type breaks TestConfigurationConverter.
-        # If we need this to be 'arm' in the future, then we first have to fix TestConfigurationConverter.
-        ('icecreamsandwich', 'x86'))
-
-    ALL_BASELINE_VARIANTS = [
-        'chromium-mac-mountainlion', 'chromium-mac-lion', 'chromium-mac-snowleopard',
-        'chromium-win-win7', 'chromium-win-xp',
-        'chromium-linux-x86_64', 'chromium-linux-x86',
-    ]
-
-    CONFIGURATION_SPECIFIER_MACROS = {
-        'mac': ['snowleopard', 'lion', 'mountainlion'],
-        'win': ['xp', 'win7'],
-        'linux': ['lucid'],
-        'android': ['icecreamsandwich'],
-    }
-
-    DEFAULT_BUILD_DIRECTORIES = ('out',)
-
-    # overridden in subclasses.
-    FALLBACK_PATHS = {}
-
-    @classmethod
-    def _static_build_path(cls, filesystem, build_directory, chromium_base, webkit_base, configuration, comps):
-        if build_directory:
-            return filesystem.join(build_directory, configuration, *comps)
-
-        hits = []
-        for directory in cls.DEFAULT_BUILD_DIRECTORIES:
-            base_dir = filesystem.join(chromium_base, directory, configuration)
-            path = filesystem.join(base_dir, *comps)
-            if filesystem.exists(path):
-                hits.append((filesystem.mtime(path), path))
-
-        for directory in cls.DEFAULT_BUILD_DIRECTORIES:
-            base_dir = filesystem.join(webkit_base, directory, configuration)
-            path = filesystem.join(base_dir, *comps)
-            if filesystem.exists(path):
-                hits.append((filesystem.mtime(path), path))
-
-        if hits:
-            hits.sort(reverse=True)
-            return hits[0][1]  # Return the newest file found.
-
-        # We have to default to something, so pick the last one.
-        return filesystem.join(base_dir, *comps)
-
-    @classmethod
-    def _chromium_base_dir(cls, filesystem):
-        module_path = filesystem.path_to_module(cls.__module__)
-        offset = module_path.find('third_party')
-        if offset == -1:
-            return filesystem.join(module_path[0:module_path.find('Tools')], 'Source', 'WebKit', 'chromium')
-        else:
-            return module_path[0:offset]
-
-    def __init__(self, host, port_name, **kwargs):
-        super(ChromiumPort, self).__init__(host, port_name, **kwargs)
-        # All sub-classes override this, but we need an initial value for testing.
-        self._chromium_base_dir_path = None
-
-    def is_chromium(self):
-        return True
-
-    def default_max_locked_shards(self):
-        """Return the number of "locked" shards to run in parallel (like the http tests)."""
-        max_locked_shards = int(self.default_child_processes()) / 4
-        if not max_locked_shards:
-            return 1
-        return max_locked_shards
-
-    def default_pixel_tests(self):
-        return True
-
-    def default_baseline_search_path(self):
-        return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version()])
-
-    def default_timeout_ms(self):
-        if self.get_option('configuration') == 'Debug':
-            return 12 * 1000
-        return 6 * 1000
-
-    def _check_file_exists(self, path_to_file, file_description,
-                           override_step=None, logging=True):
-        """Verify the file is present where expected or log an error.
-
-        Args:
-            file_name: The (human friendly) name or description of the file
-                you're looking for (e.g., "HTTP Server"). Used for error logging.
-            override_step: An optional string to be logged if the check fails.
-            logging: Whether or not log the error messages."""
-        if not self._filesystem.exists(path_to_file):
-            if logging:
-                _log.error('Unable to find %s' % file_description)
-                _log.error('    at %s' % path_to_file)
-                if override_step:
-                    _log.error('    %s' % override_step)
-                    _log.error('')
-            return False
-        return True
-
-    def check_build(self, needs_http):
-        result = True
-
-        dump_render_tree_binary_path = self._path_to_driver()
-        result = self._check_file_exists(dump_render_tree_binary_path,
-                                         'test driver') and result
-        if result and self.get_option('build'):
-            result = self._check_driver_build_up_to_date(
-                self.get_option('configuration'))
-        else:
-            _log.error('')
-
-        helper_path = self._path_to_helper()
-        if helper_path:
-            result = self._check_file_exists(helper_path,
-                                             'layout test helper') and result
-
-        if self.get_option('pixel_tests'):
-            result = self.check_image_diff(
-                'To override, invoke with --no-pixel-tests') and result
-
-        # It's okay if pretty patch and wdiff aren't available, but we will at least log messages.
-        self._pretty_patch_available = self.check_pretty_patch()
-        self._wdiff_available = self.check_wdiff()
-
-        return result
-
-    def check_sys_deps(self, needs_http):
-        result = super(ChromiumPort, self).check_sys_deps(needs_http)
-
-        cmd = [self._path_to_driver(), '--check-layout-test-sys-deps']
-
-        local_error = executive.ScriptError()
-
-        def error_handler(script_error):
-            local_error.exit_code = script_error.exit_code
-
-        output = self._executive.run_command(cmd, error_handler=error_handler)
-        if local_error.exit_code:
-            _log.error('System dependencies check failed.')
-            _log.error('To override, invoke with --nocheck-sys-deps')
-            _log.error('')
-            _log.error(output)
-            return False
-        return result
-
-    def check_image_diff(self, override_step=None, logging=True):
-        image_diff_path = self._path_to_image_diff()
-        return self._check_file_exists(image_diff_path, 'image diff exe',
-                                       override_step, logging)
-
-    def diff_image(self, expected_contents, actual_contents, tolerance=None):
-        # tolerance is not used in chromium. Make sure caller doesn't pass tolerance other than zero or None.
-        assert (tolerance is None) or tolerance == 0
-
-        # If only one of them exists, return that one.
-        if not actual_contents and not expected_contents:
-            return (None, 0, None)
-        if not actual_contents:
-            return (expected_contents, 0, None)
-        if not expected_contents:
-            return (actual_contents, 0, None)
-
-        tempdir = self._filesystem.mkdtemp()
-
-        expected_filename = self._filesystem.join(str(tempdir), "expected.png")
-        self._filesystem.write_binary_file(expected_filename, expected_contents)
-
-        actual_filename = self._filesystem.join(str(tempdir), "actual.png")
-        self._filesystem.write_binary_file(actual_filename, actual_contents)
-
-        diff_filename = self._filesystem.join(str(tempdir), "diff.png")
-
-        native_expected_filename = self._convert_path(expected_filename)
-        native_actual_filename = self._convert_path(actual_filename)
-        native_diff_filename = self._convert_path(diff_filename)
-
-        executable = self._path_to_image_diff()
-        # Note that although we are handed 'old', 'new', image_diff wants 'new', 'old'.
-        comand = [executable, '--diff', native_actual_filename, native_expected_filename, native_diff_filename]
-
-        result = None
-        err_str = None
-        try:
-            exit_code = self._executive.run_command(comand, return_exit_code=True)
-            if exit_code == 0:
-                # The images are the same.
-                result = None
-            elif exit_code == 1:
-                result = self._filesystem.read_binary_file(native_diff_filename)
-            else:
-                err_str = "image diff returned an exit code of %s" % exit_code
-        except OSError, e:
-            err_str = 'error running image diff: %s' % str(e)
-        finally:
-            self._filesystem.rmtree(str(tempdir))
-
-        return (result, 0, err_str or None)  # FIXME: how to get % diff?
-
-    def path_from_chromium_base(self, *comps):
-        """Returns the full path to path made by joining the top of the
-        Chromium source tree and the list of path components in |*comps|."""
-        if self._chromium_base_dir_path is None:
-            self._chromium_base_dir_path = self._chromium_base_dir(self._filesystem)
-        return self._filesystem.join(self._chromium_base_dir_path, *comps)
-
-    def setup_environ_for_server(self, server_name=None):
-        clean_env = super(ChromiumPort, self).setup_environ_for_server(server_name)
-        # Webkit Linux (valgrind layout) bot needs these envvars.
-        self._copy_value_from_environ_if_set(clean_env, 'VALGRIND_LIB')
-        self._copy_value_from_environ_if_set(clean_env, 'VALGRIND_LIB_INNER')
-        return clean_env
-
-    def default_results_directory(self):
-        try:
-            return self.path_from_chromium_base('webkit', self.get_option('configuration'), 'layout-test-results')
-        except AssertionError:
-            return self._build_path('layout-test-results')
-
-    def _missing_symbol_to_skipped_tests(self):
-        # FIXME: Should WebKitPort have these definitions also?
-        return {
-            "ff_mp3_decoder": ["webaudio/codec-tests/mp3"],
-            "ff_aac_decoder": ["webaudio/codec-tests/aac"],
-        }
-
-    def setup_test_run(self):
-        super(ChromiumPort, self).setup_test_run()
-        # Delete the disk cache if any to ensure a clean test run.
-        dump_render_tree_binary_path = self._path_to_driver()
-        cachedir = self._filesystem.dirname(dump_render_tree_binary_path)
-        cachedir = self._filesystem.join(cachedir, "cache")
-        if self._filesystem.exists(cachedir):
-            self._filesystem.rmtree(cachedir)
-
-    def start_helper(self):
-        helper_path = self._path_to_helper()
-        if helper_path:
-            _log.debug("Starting layout helper %s" % helper_path)
-            # Note: Not thread safe: http://bugs.python.org/issue2320
-            self._helper = subprocess.Popen([helper_path],
-                stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None)
-            is_ready = self._helper.stdout.readline()
-            if not is_ready.startswith('ready'):
-                _log.error("layout_test_helper failed to be ready")
-
-    def stop_helper(self):
-        if self._helper:
-            _log.debug("Stopping layout test helper")
-            try:
-                self._helper.stdin.write("x\n")
-                self._helper.stdin.close()
-                self._helper.wait()
-            except IOError, e:
-                pass
-            finally:
-                self._helper = None
-
-
-    def exit_code_from_summarized_results(self, unexpected_results):
-        # Turn bots red for missing results.
-        return unexpected_results['num_regressions'] + unexpected_results['num_missing']
-
-    def configuration_specifier_macros(self):
-        return self.CONFIGURATION_SPECIFIER_MACROS
-
-    def all_baseline_variants(self):
-        return self.ALL_BASELINE_VARIANTS
-
-    def _generate_all_test_configurations(self):
-        """Returns a sequence of the TestConfigurations the port supports."""
-        # By default, we assume we want to test every graphics type in
-        # every configuration on every system.
-        test_configurations = []
-        for version, architecture in self.ALL_SYSTEMS:
-            for build_type in self.ALL_BUILD_TYPES:
-                test_configurations.append(TestConfiguration(version, architecture, build_type))
-        return test_configurations
-
-    try_builder_names = frozenset([
-        'linux_layout',
-        'mac_layout',
-        'win_layout',
-        'linux_layout_rel',
-        'mac_layout_rel',
-        'win_layout_rel',
-    ])
-
-    def warn_if_bug_missing_in_test_expectations(self):
-        return True
-
-    def _port_specific_expectations_files(self):
-        paths = [self.path_to_test_expectations_file()]
-        skia_expectations_path = self.path_from_chromium_base('skia', 'skia_test_expectations.txt')
-        # FIXME: we should probably warn if this file is missing in some situations.
-        # See the discussion in webkit.org/b/97699.
-        if self._filesystem.exists(skia_expectations_path):
-            paths.append(skia_expectations_path)
-
-        builder_name = self.get_option('builder_name', 'DUMMY_BUILDER_NAME')
-        if builder_name == 'DUMMY_BUILDER_NAME' or '(deps)' in builder_name or builder_name in self.try_builder_names:
-            paths.append(self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt'))
-        return paths
-
-    def repository_paths(self):
-        repos = super(ChromiumPort, self).repository_paths()
-        repos.append(('Chromium', self.path_from_chromium_base('build')))
-        return repos
-
-    def _get_crash_log(self, name, pid, stdout, stderr, newer_than):
-        if stderr and 'AddressSanitizer' in stderr:
-            # Running the AddressSanitizer take a lot of memory, so we need to
-            # serialize access to it across all the concurrently running drivers.
-            lock = HttpLock(lock_path=None, lock_file_prefix='WebKitASAN.lock.',
-                            filesystem=self._filesystem, executive=self._executive,
-                            name='ASAN')
-            try:
-                lock.wait_for_httpd_lock()
-                asan_filter_path = self.path_from_chromium_base('tools', 'valgrind', 'asan', 'asan_symbolize.py')
-                if self._filesystem.exists(asan_filter_path):
-                    output = self._executive.run_command([asan_filter_path], input=stderr, decode_output=False)
-                    stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False)
-            finally:
-                lock.cleanup_http_lock()
-
-        return super(ChromiumPort, self)._get_crash_log(name, pid, stdout, stderr, newer_than)
-
-    def virtual_test_suites(self):
-        return [
-            VirtualTestSuite('platform/chromium/virtual/gpu/fast/canvas',
-                             'fast/canvas',
-                             ['--enable-accelerated-2d-canvas']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/canvas/philip',
-                             'canvas/philip',
-                             ['--enable-accelerated-2d-canvas']),
-            VirtualTestSuite('platform/chromium/virtual/threaded/compositing/visibility',
-                             'compositing/visibility',
-                             ['--enable-threaded-compositing']),
-            VirtualTestSuite('platform/chromium/virtual/threaded/compositing/webgl',
-                             'compositing/webgl',
-                             ['--enable-threaded-compositing']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/fast/hidpi',
-                             'fast/hidpi',
-                             ['--force-compositing-mode']),
-            VirtualTestSuite('platform/chromium/virtual/softwarecompositing',
-                             'compositing',
-                             ['--enable-software-compositing']),
-            VirtualTestSuite('platform/chromium/virtual/deferred/fast/images',
-                             'fast/images',
-                             ['--enable-deferred-image-decoding', '--enable-per-tile-painting', '--force-compositing-mode']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/overflow',
-                             'compositing/overflow',
-                             ['--enable-accelerated-overflow-scroll']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/scrollbars',
-                             'scrollbars',
-                             ['--enable-accelerated-overflow-scroll']),
-        ]
-
-    #
-    # PROTECTED METHODS
-    #
-    # These routines should only be called by other methods in this file
-    # or any subclasses.
-    #
-
-    def _build_path(self, *comps):
-        return self._build_path_with_configuration(None, *comps)
-
-    def _build_path_with_configuration(self, configuration, *comps):
-        # Note that we don't implement --root or do the option caching that the
-        # base class does, because chromium doesn't use 'webkit-build-directory' and
-        # hence finding the right directory is relatively fast.
-        configuration = configuration or self.get_option('configuration')
-        return self._static_build_path(self._filesystem, self.get_option('build_directory'),
-            self.path_from_chromium_base(), self.path_from_webkit_base(), configuration, comps)
-
-    def _path_to_image_diff(self):
-        binary_name = 'ImageDiff'
-        return self._build_path(binary_name)
-
-    def _check_driver_build_up_to_date(self, configuration):
-        if configuration in ('Debug', 'Release'):
-            try:
-                debug_path = self._path_to_driver('Debug')
-                release_path = self._path_to_driver('Release')
-
-                debug_mtime = self._filesystem.mtime(debug_path)
-                release_mtime = self._filesystem.mtime(release_path)
-
-                if (debug_mtime > release_mtime and configuration == 'Release' or
-                    release_mtime > debug_mtime and configuration == 'Debug'):
-                    most_recent_binary = 'Release' if configuration == 'Debug' else 'Debug'
-                    _log.warning('You are running the %s binary. However the %s binary appears to be more recent. '
-                                 'Please pass --%s.', configuration, most_recent_binary, most_recent_binary.lower())
-                    _log.warning('')
-            # This will fail if we don't have both a debug and release binary.
-            # That's fine because, in this case, we must already be running the
-            # most up-to-date one.
-            except OSError:
-                pass
-        return True
-
-    def _chromium_baseline_path(self, platform):
-        if platform is None:
-            platform = self.name()
-        return self.path_from_webkit_base('LayoutTests', 'platform', platform)
-
-    def _convert_path(self, path):
-        """Handles filename conversion for subprocess command line args."""
-        # See note above in diff_image() for why we need this.
-        if sys.platform == 'cygwin':
-            return cygpath(path)
-        return path
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
deleted file mode 100644 (file)
index b095463..0000000
+++ /dev/null
@@ -1,934 +0,0 @@
-# Copyright (C) 2012 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import copy
-import logging
-import os
-import re
-import sys
-import subprocess
-import threading
-import time
-
-from webkitpy.layout_tests.port import chromium
-from webkitpy.layout_tests.port import driver
-from webkitpy.layout_tests.port import factory
-from webkitpy.layout_tests.port import server_process
-from webkitpy.common.system.profiler import SingleFileOutputProfiler
-
-_log = logging.getLogger(__name__)
-
-# The root directory for test resources, which has the same structure as the
-# source root directory of Chromium.
-# This path is defined in Chromium's base/test/test_support_android.cc.
-DEVICE_SOURCE_ROOT_DIR = '/data/local/tmp/'
-COMMAND_LINE_FILE = DEVICE_SOURCE_ROOT_DIR + 'chrome-native-tests-command-line'
-
-# The directory to put tools and resources of DumpRenderTree.
-# If change this, must also change Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
-# and Chromium's webkit/support/platform_support_android.cc.
-DEVICE_DRT_DIR = DEVICE_SOURCE_ROOT_DIR + 'drt/'
-DEVICE_FORWARDER_PATH = DEVICE_DRT_DIR + 'forwarder'
-
-# Path on the device where the test framework will create the fifo pipes.
-DEVICE_FIFO_PATH = '/data/data/org.chromium.native_test/files/'
-
-DRT_APP_PACKAGE = 'org.chromium.native_test'
-DRT_ACTIVITY_FULL_NAME = DRT_APP_PACKAGE + '/.ChromeNativeTestActivity'
-DRT_APP_CACHE_DIR = DEVICE_DRT_DIR + 'cache/'
-DRT_LIBRARY_NAME = 'libDumpRenderTree.so'
-
-SCALING_GOVERNORS_PATTERN = "/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
-KPTR_RESTRICT_PATH = "/proc/sys/kernel/kptr_restrict"
-
-# All the test cases are still served to DumpRenderTree through file protocol,
-# but we use a file-to-http feature to bridge the file request to host's http
-# server to get the real test files and corresponding resources.
-# See webkit/support/platform_support_android.cc for the other side of this bridge.
-PERF_TEST_PATH_PREFIX = '/all-perf-tests'
-LAYOUT_TEST_PATH_PREFIX = '/all-tests'
-
-# All ports the Android forwarder to forward.
-# 8000, 8080 and 8443 are for http/https tests.
-# 8880 and 9323 are for websocket tests
-# (see http_server.py, apache_http_server.py and websocket_server.py).
-FORWARD_PORTS = '8000 8080 8443 8880 9323'
-
-MS_TRUETYPE_FONTS_DIR = '/usr/share/fonts/truetype/msttcorefonts/'
-MS_TRUETYPE_FONTS_PACKAGE = 'ttf-mscorefonts-installer'
-
-# Timeout in seconds to wait for start/stop of DumpRenderTree.
-DRT_START_STOP_TIMEOUT_SECS = 10
-
-# List of fonts that layout tests expect, copied from DumpRenderTree/chromium/TestShellX11.cpp.
-HOST_FONT_FILES = [
-    [[MS_TRUETYPE_FONTS_DIR], 'Arial.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Arial_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Arial_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Arial_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Comic_Sans_MS.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Comic_Sans_MS_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Courier_New.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Georgia.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Impact.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Verdana.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
-    # The Microsoft font EULA
-    [['/usr/share/doc/ttf-mscorefonts-installer/'], 'READ_ME!.gz', MS_TRUETYPE_FONTS_PACKAGE],
-    # Other fonts: Arabic, CJK, Indic, Thai, etc.
-    [['/usr/share/fonts/truetype/ttf-dejavu/'], 'DejaVuSans.ttf', 'ttf-dejavu'],
-    [['/usr/share/fonts/truetype/kochi/'], 'kochi-mincho.ttf', 'ttf-kochi-mincho'],
-    [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'lohit_hi.ttf', 'ttf-indic-fonts-core'],
-    [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'lohit_ta.ttf', 'ttf-indic-fonts-core'],
-    [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'MuktiNarrow.ttf', 'ttf-indic-fonts-core'],
-    [['/usr/share/fonts/truetype/thai/', '/usr/share/fonts/truetype/tlwg/'], 'Garuda.ttf', 'fonts-tlwg-garuda'],
-    [['/usr/share/fonts/truetype/ttf-indic-fonts-core/', '/usr/share/fonts/truetype/ttf-punjabi-fonts/'], 'lohit_pa.ttf', 'ttf-indic-fonts-core'],
-]
-
-DEVICE_FONTS_DIR = DEVICE_DRT_DIR + 'fonts/'
-
-# The layout tests directory on device, which has two usages:
-# 1. as a virtual path in file urls that will be bridged to HTTP.
-# 2. pointing to some files that are pushed to the device for tests that
-# don't work on file-over-http (e.g. blob protocol tests).
-DEVICE_WEBKIT_BASE_DIR = DEVICE_SOURCE_ROOT_DIR + 'third_party/WebKit/'
-DEVICE_LAYOUT_TESTS_DIR = DEVICE_WEBKIT_BASE_DIR + 'LayoutTests/'
-
-# Test resources that need to be accessed as files directly.
-# Each item can be the relative path of a directory or a file.
-TEST_RESOURCES_TO_PUSH = [
-    # Blob tests need to access files directly.
-    'editing/pasteboard/resources',
-    'fast/files/resources',
-    'http/tests/local/resources',
-    'http/tests/local/formdata/resources',
-    # User style URLs are accessed as local files in webkit_support.
-    'http/tests/security/resources/cssStyle.css',
-    # Media tests need to access audio/video as files.
-    'media/content',
-    'compositing/resources/video.mp4',
-]
-
-# List of test resources from webkit platform. These resources will be copied to the external storage.
-WEBKIT_PLATFORM_RESOURCES_TO_PUSH = [
-    'third_party/hyphen/hyph_en_US.dic',
-]
-
-MD5SUM_DEVICE_FILE_NAME = 'md5sum_bin'
-MD5SUM_DEVICE_PATH = '/data/local/tmp/' + MD5SUM_DEVICE_FILE_NAME
-
-class ChromiumAndroidPort(chromium.ChromiumPort):
-    port_name = 'chromium-android'
-
-    # Avoid initializing the adb path [worker count]+1 times by storing it as a static member.
-    _adb_path = None
-
-    FALLBACK_PATHS = [
-        'chromium-android',
-        'chromium-linux',
-        'chromium-win',
-        'chromium',
-    ]
-
-    def __init__(self, host, port_name, **kwargs):
-        super(ChromiumAndroidPort, self).__init__(host, port_name, **kwargs)
-
-        self._operating_system = 'android'
-        self._version = 'icecreamsandwich'
-
-        self._host_port = factory.PortFactory(host).get('chromium', **kwargs)
-        self._server_process_constructor = self._android_server_process_constructor
-
-        if hasattr(self._options, 'adb_device'):
-            self._devices = self._options.adb_device
-        else:
-            self._devices = []
-
-    @staticmethod
-    def _android_server_process_constructor(port, server_name, cmd_line, env=None):
-        return server_process.ServerProcess(port, server_name, cmd_line, env,
-                                            universal_newlines=True, treat_no_data_as_crash=True)
-
-    def additional_drt_flag(self):
-        # The Chromium port for Android always uses the hardware GPU path.
-        return ['--encode-binary', '--enable-hardware-gpu',
-                '--force-compositing-mode',
-                '--enable-accelerated-fixed-position']
-
-    def default_timeout_ms(self):
-        # Android platform has less computing power than desktop platforms.
-        # Using 10 seconds allows us to pass most slow tests which are not
-        # marked as slow tests on desktop platforms.
-        return 10 * 1000
-
-    def driver_stop_timeout(self):
-        # DRT doesn't respond to closing stdin, so we might as well stop the driver immediately.
-        return 0.0
-
-    def default_child_processes(self):
-        return len(self._get_devices())
-
-    def default_baseline_search_path(self):
-        return map(self._webkit_baseline_path, self.FALLBACK_PATHS)
-
-    def check_wdiff(self, logging=True):
-        return self._host_port.check_wdiff(logging)
-
-    def check_build(self, needs_http):
-        result = super(ChromiumAndroidPort, self).check_build(needs_http)
-        result = self._check_file_exists(self.path_to_md5sum(), 'md5sum utility') and result
-        result = self._check_file_exists(self.path_to_forwarder(), 'forwarder utility') and result
-        if not result:
-            _log.error('For complete Android build requirements, please see:')
-            _log.error('')
-            _log.error('    http://code.google.com/p/chromium/wiki/AndroidBuildInstructions')
-
-        return result
-
-    def check_sys_deps(self, needs_http):
-        for (font_dirs, font_file, package) in HOST_FONT_FILES:
-            exists = False
-            for font_dir in font_dirs:
-                font_path = font_dir + font_file
-                if self._check_file_exists(font_path, '', logging=False):
-                    exists = True
-                    break
-            if not exists:
-                _log.error('You are missing %s under %s. Try installing %s. See build instructions.' % (font_file, font_dirs, package))
-                return False
-        return True
-
-    def _port_specific_expectations_files(self):
-        # LayoutTests/platform/chromium-android/TestExpectations should contain only the rules to
-        # skip tests for the features not supported or not testable on Android.
-        # Other rules should be in LayoutTests/platform/chromium/TestExpectations.
-        android_expectations_file = self.path_from_webkit_base('LayoutTests', 'platform', 'chromium-android', 'TestExpectations')
-        return super(ChromiumAndroidPort, self)._port_specific_expectations_files() + [android_expectations_file]
-
-    def requires_http_server(self):
-        """Chromium Android runs tests on devices, and uses the HTTP server to
-        serve the actual layout tests to DumpRenderTree."""
-        return True
-
-    def start_http_server(self, additional_dirs=None, number_of_servers=0):
-        if not additional_dirs:
-            additional_dirs = {}
-        additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir()
-        additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir()
-        super(ChromiumAndroidPort, self).start_http_server(additional_dirs, number_of_servers)
-
-    def create_driver(self, worker_number, no_timeout=False):
-        # We don't want the default DriverProxy which is not compatible with our driver.
-        # See comments in ChromiumAndroidDriver.start().
-        return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_option('pixel_tests'),
-                                     # Force no timeout to avoid DumpRenderTree timeouts before NRWT.
-                                     no_timeout=True)
-
-    def driver_cmd_line(self):
-        # Override to return the actual DumpRenderTree command line.
-        return self.create_driver(0)._drt_cmd_line(self.get_option('pixel_tests'), [])
-
-    def path_to_adb(self):
-        if ChromiumAndroidPort._adb_path:
-            return ChromiumAndroidPort._adb_path
-
-        provided_adb_path = self.path_from_chromium_base('third_party', 'android_tools', 'sdk', 'platform-tools', 'adb')
-
-        path_version = self._determine_adb_version('adb')
-        provided_version = self._determine_adb_version(provided_adb_path)
-        assert provided_version, 'The checked in Android SDK is missing. Are you sure you ran update-webkit --chromium-android?'
-
-        if not path_version:
-            ChromiumAndroidPort._adb_path = provided_adb_path
-        elif provided_version > path_version:
-            _log.warning('The "adb" version in your path is older than the one checked in, consider updating your local Android SDK. Using the checked in one.')
-            ChromiumAndroidPort._adb_path = provided_adb_path
-        else:
-            ChromiumAndroidPort._adb_path = 'adb'
-
-        return ChromiumAndroidPort._adb_path
-
-    def path_to_forwarder(self):
-        return self._build_path('forwarder')
-
-    def path_to_md5sum(self):
-        return self._build_path(MD5SUM_DEVICE_FILE_NAME)
-
-    # Overridden private functions.
-
-    def _build_path(self, *comps):
-        return self._host_port._build_path(*comps)
-
-    def _build_path_with_configuration(self, configuration, *comps):
-        return self._host_port._build_path_with_configuration(configuration, *comps)
-
-    def _path_to_apache(self):
-        return self._host_port._path_to_apache()
-
-    def _path_to_apache_config_file(self):
-        return self._host_port._path_to_apache_config_file()
-
-    def _path_to_driver(self, configuration=None):
-        return self._build_path_with_configuration(configuration, 'DumpRenderTree_apk/DumpRenderTree-debug.apk')
-
-    def _path_to_helper(self):
-        return None
-
-    def _path_to_image_diff(self):
-        return self._host_port._path_to_image_diff()
-
-    def _path_to_lighttpd(self):
-        return self._host_port._path_to_lighttpd()
-
-    def _path_to_lighttpd_modules(self):
-        return self._host_port._path_to_lighttpd_modules()
-
-    def _path_to_lighttpd_php(self):
-        return self._host_port._path_to_lighttpd_php()
-
-    def _path_to_wdiff(self):
-        return self._host_port._path_to_wdiff()
-
-    def _shut_down_http_server(self, pid):
-        return self._host_port._shut_down_http_server(pid)
-
-    def _driver_class(self):
-        return ChromiumAndroidDriver
-
-    # Local private functions.
-
-    def _determine_adb_version(self, adb_path):
-        re_version = re.compile('^.*version ([\d\.]+)$')
-        try:
-            output = self._executive.run_command([adb_path, 'version'], error_handler=self._executive.ignore_error)
-        except OSError:
-            return None
-        result = re_version.match(output)
-        if not output or not result:
-            return None
-        return [int(n) for n in result.group(1).split('.')]
-
-    def _get_devices(self):
-        if not self._devices:
-            re_device = re.compile('^([a-zA-Z0-9_:.-]+)\tdevice$', re.MULTILINE)
-            result = self._executive.run_command([self.path_to_adb(), 'devices'], error_handler=self._executive.ignore_error)
-            self._devices = re_device.findall(result)
-            if not self._devices:
-                raise AssertionError('No devices attached. Result of "adb devices": %s' % result)
-        return self._devices
-
-    def _get_device_serial(self, worker_number):
-        devices = self._get_devices()
-        if worker_number >= len(devices):
-            raise AssertionError('Worker number exceeds available number of devices')
-        return devices[worker_number]
-
-
-class AndroidPerf(SingleFileOutputProfiler):
-    _cached_perf_host_path = None
-    _have_searched_for_perf_host = False
-
-    def __init__(self, host, executable_path, output_dir, adb_path, device_serial, symfs_path, kallsyms_path, identifier=None):
-        super(AndroidPerf, self).__init__(host, executable_path, output_dir, "data", identifier)
-        self._device_serial = device_serial
-        self._adb_command = [adb_path, '-s', self._device_serial]
-        self._perf_process = None
-        self._symfs_path = symfs_path
-        self._kallsyms_path = kallsyms_path
-
-    def check_configuration(self):
-        # Check that perf is installed
-        if not self._file_exists_on_device('/system/bin/perf'):
-            print "Cannot find /system/bin/perf on device %s" % self._device_serial
-            return False
-        # Check that the device is a userdebug build (or at least has the necessary libraries).
-        if self._run_adb_command(['shell', 'getprop', 'ro.build.type']).strip() != 'userdebug':
-            print "Device %s is not flashed with a userdebug build of Android" % self._device_serial
-            return False
-        # FIXME: Check that the binary actually is perf-able (has stackframe pointers)?
-        # objdump -s a function and make sure it modifies the fp?
-        # Instruct users to rebuild after export GYP_DEFINES="profiling=1 $GYP_DEFINES"
-        return True
-
-    def print_setup_instructions(self):
-        print """
-perf on android requires a 'userdebug' build of Android, see:
-http://source.android.com/source/building-devices.html"
-
-The perf command can be built from:
-https://android.googlesource.com/platform/external/linux-tools-perf/
-and requires libefl, libebl, libdw, and libdwfl available in:
-https://android.googlesource.com/platform/external/elfutils/
-
-DumpRenderTree must be built with profiling=1, make sure you've done:
-export GYP_DEFINES="profiling=1 $GYP_DEFINES"
-update-webkit --chromium-android
-build-webkit --chromium-android
-
-Googlers should read:
-http://goto.google.com/cr-android-perf-howto
-"""
-
-    def _file_exists_on_device(self, full_file_path):
-        assert full_file_path.startswith('/')
-        return self._run_adb_command(['shell', 'ls', full_file_path]).strip() == full_file_path
-
-    def _run_adb_command(self, cmd):
-        return self._host.executive.run_command(self._adb_command + cmd)
-
-    def attach_to_pid(self, pid):
-        assert(pid)
-        assert(self._perf_process == None)
-        # FIXME: This can't be a fixed timeout!
-        cmd = self._adb_command + ['shell', 'perf', 'record', '-g', '-p', pid, 'sleep', 30]
-        self._perf_process = self._host.executive.popen(cmd)
-
-    def _perf_version_string(self, perf_path):
-        try:
-            return self._host.executive.run_command([perf_path, '--version'])
-        except:
-            return None
-
-    def _find_perfhost_binary(self):
-        perfhost_version = self._perf_version_string('perfhost_linux')
-        if perfhost_version:
-            return 'perfhost_linux'
-        perf_version = self._perf_version_string('perf')
-        if perf_version:
-            return 'perf'
-        return None
-
-    def _perfhost_path(self):
-        if self._have_searched_for_perf_host:
-            return self._cached_perf_host_path
-        self._have_searched_for_perf_host = True
-        self._cached_perf_host_path = self._find_perfhost_binary()
-        return self._cached_perf_host_path
-
-    def _first_ten_lines_of_profile(self, perf_output):
-        match = re.search("^#[^\n]*\n((?: [^\n]*\n){1,10})", perf_output, re.MULTILINE)
-        return match.group(1) if match else None
-
-    def profile_after_exit(self):
-        perf_exitcode = self._perf_process.wait()
-        if perf_exitcode != 0:
-            print "Perf failed (exit code: %i), can't process results." % perf_exitcode
-            return
-        self._run_adb_command(['pull', '/data/perf.data', self._output_path])
-
-        perfhost_path = self._perfhost_path()
-        perfhost_report_command = [
-            'report',
-            '--input', self._output_path,
-            '--symfs', self._symfs_path,
-            '--kallsyms', self._kallsyms_path,
-        ]
-        if perfhost_path:
-            perfhost_args = [perfhost_path] + perfhost_report_command + ['--call-graph', 'none']
-            perf_output = self._host.executive.run_command(perfhost_args)
-            # We could save off the full -g report to a file if users found that useful.
-            print self._first_ten_lines_of_profile(perf_output)
-        else:
-            print """
-Failed to find perfhost_linux binary, can't process samples from the device.
-
-perfhost_linux can be built from:
-https://android.googlesource.com/platform/external/linux-tools-perf/
-also, modern versions of perf (available from apt-get install goobuntu-kernel-tools-common)
-may also be able to process the perf.data files from the device.
-
-Googlers should read:
-http://goto.google.com/cr-android-perf-howto
-for instructions on installing pre-built copies of perfhost_linux
-http://crbug.com/165250 discusses making these pre-built binaries externally available.
-"""
-
-        perfhost_display_patch = perfhost_path if perfhost_path else 'perfhost_linux'
-        print "To view the full profile, run:"
-        print ' '.join([perfhost_display_patch] + perfhost_report_command)
-
-
-class ChromiumAndroidDriver(driver.Driver):
-    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
-        super(ChromiumAndroidDriver, self).__init__(port, worker_number, pixel_tests, no_timeout)
-        self._cmd_line = None
-        self._in_fifo_path = DEVICE_FIFO_PATH + 'stdin.fifo'
-        self._out_fifo_path = DEVICE_FIFO_PATH + 'test.fifo'
-        self._err_fifo_path = DEVICE_FIFO_PATH + 'stderr.fifo'
-        self._read_stdout_process = None
-        self._read_stderr_process = None
-        self._forwarder_process = None
-        self._has_setup = False
-        self._original_governors = {}
-        self._original_kptr_restrict = None
-        self._device_serial = port._get_device_serial(worker_number)
-        self._adb_command_base = None
-
-        # FIXME: If we taught ProfileFactory about "target" devices we could
-        # just use the logic in Driver instead of duplicating it here.
-        if self._port.get_option("profile"):
-            # FIXME: This should be done once, instead of per-driver!
-            symfs_path = self._find_or_create_symfs()
-            kallsyms_path = self._update_kallsyms_cache(symfs_path)
-            # FIXME: We should pass this some sort of "Bridge" object abstraction around ADB instead of a path/device pair.
-            self._profiler = AndroidPerf(self._port.host, self._port._path_to_driver(), self._port.results_directory(),
-                self._port.path_to_adb(), self._device_serial, symfs_path, kallsyms_path)
-            # FIXME: This is a layering violation and should be moved to Port.check_sys_deps
-            # once we have an abstraction around an adb_path/device_serial pair to make it
-            # easy to make these class methods on AndroidPerf.
-            if not self._profiler.check_configuration():
-                self._profiler.print_setup_instructions()
-                sys.exit(1)
-        else:
-            self._profiler = None
-
-    def __del__(self):
-        self._teardown_performance()
-        super(ChromiumAndroidDriver, self).__del__()
-
-    def _update_kallsyms_cache(self, output_dir):
-        kallsyms_name = "%s-kallsyms" % self._device_serial
-        kallsyms_cache_path = self._port.host.filesystem.join(output_dir, kallsyms_name)
-
-        self._restart_adb_as_root()
-
-        saved_kptr_restrict = self._run_adb_command(['shell', 'cat', KPTR_RESTRICT_PATH]).strip()
-        self._run_adb_command(['shell', 'echo', '0', '>', KPTR_RESTRICT_PATH])
-
-        print "Updating kallsyms file (%s) from device" % kallsyms_cache_path
-        self._pull_from_device("/proc/kallsyms", kallsyms_cache_path)
-
-        self._run_adb_command(['shell', 'echo', saved_kptr_restrict, '>', KPTR_RESTRICT_PATH])
-
-        return kallsyms_cache_path
-
-    def _find_or_create_symfs(self):
-        environment = self._port.host.copy_current_environment()
-        env = environment.to_dictionary()
-        fs = self._port.host.filesystem
-
-        if 'ANDROID_SYMFS' in env:
-            symfs_path = env['ANDROID_SYMFS']
-        else:
-            symfs_path = fs.join(self._port.results_directory(), 'symfs')
-            print "ANDROID_SYMFS not set, using %s" % symfs_path
-
-        # find the installed path, and the path of the symboled built library
-        # FIXME: We should get the install path from the device!
-        symfs_library_path = fs.join(symfs_path, "data/app-lib/%s-1/%s" % (DRT_APP_PACKAGE, DRT_LIBRARY_NAME))
-        built_library_path = self._port._build_path('lib', DRT_LIBRARY_NAME)
-        assert(fs.exists(built_library_path))
-
-        # FIXME: Ideally we'd check the sha1's first and make a soft-link instead of copying (since we probably never care about windows).
-        print "Updating symfs libary (%s) from built copy (%s)" % (symfs_library_path, built_library_path)
-        fs.maybe_make_directory(fs.dirname(symfs_library_path))
-        fs.copyfile(built_library_path, symfs_library_path)
-
-        return symfs_path
-
-    def _setup_md5sum_and_push_data_if_needed(self):
-        self._md5sum_path = self._port.path_to_md5sum()
-        if not self._file_exists_on_device(MD5SUM_DEVICE_PATH):
-            if not self._push_to_device(self._md5sum_path, MD5SUM_DEVICE_PATH):
-                raise AssertionError('Could not push md5sum to device')
-
-        self._push_executable()
-        self._push_fonts()
-        self._push_test_resources()
-        self._push_platform_resources()
-
-    def _setup_test(self):
-        if self._has_setup:
-            return
-
-        self._restart_adb_as_root()
-        self._setup_md5sum_and_push_data_if_needed()
-        self._has_setup = True
-        self._setup_performance()
-
-        # Required by webkit_support::GetWebKitRootDirFilePath().
-        # Other directories will be created automatically by adb push.
-        self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_SOURCE_ROOT_DIR + 'chrome'])
-
-        # Allow the DumpRenderTree app to fully access the directory.
-        # The native code needs the permission to write temporary files and create pipes here.
-        self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_DRT_DIR])
-        self._run_adb_command(['shell', 'chmod', '777', DEVICE_DRT_DIR])
-
-        # 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.
-        self._run_adb_command(['shell', 'rm', '-r', DRT_APP_CACHE_DIR])
-
-    def _log_error(self, message):
-        _log.error('[%s] %s' % (self._device_serial, message))
-
-    def _log_debug(self, message):
-        _log.debug('[%s] %s' % (self._device_serial, message))
-
-    def _abort(self, message):
-        raise AssertionError('[%s] %s' % (self._device_serial, message))
-
-    @staticmethod
-    def _extract_hashes_from_md5sum_output(md5sum_output):
-        assert md5sum_output
-        return [line.split('  ')[0] for line in md5sum_output]
-
-    def _push_file_if_needed(self, host_file, device_file):
-        assert os.path.exists(host_file)
-        device_hashes = self._extract_hashes_from_md5sum_output(
-                self._port.host.executive.popen(self._adb_command() + ['shell', MD5SUM_DEVICE_PATH, device_file],
-                                                stdout=subprocess.PIPE).stdout)
-        host_hashes = self._extract_hashes_from_md5sum_output(
-                self._port.host.executive.popen(args=['%s_host' % self._md5sum_path, host_file],
-                                                stdout=subprocess.PIPE).stdout)
-        if host_hashes and device_hashes == host_hashes:
-            return
-        self._push_to_device(host_file, device_file)
-
-    def _push_executable(self):
-        self._push_file_if_needed(self._port.path_to_forwarder(), DEVICE_FORWARDER_PATH)
-        self._push_file_if_needed(self._port._build_path('DumpRenderTree.pak'), DEVICE_DRT_DIR + 'DumpRenderTree.pak')
-        self._push_file_if_needed(self._port._build_path('DumpRenderTree_resources'), DEVICE_DRT_DIR + 'DumpRenderTree_resources')
-        self._push_file_if_needed(self._port._build_path('android_main_fonts.xml'), DEVICE_DRT_DIR + 'android_main_fonts.xml')
-        self._push_file_if_needed(self._port._build_path('android_fallback_fonts.xml'), DEVICE_DRT_DIR + 'android_fallback_fonts.xml')
-        self._run_adb_command(['uninstall', DRT_APP_PACKAGE])
-        drt_host_path = self._port._path_to_driver()
-        install_result = self._run_adb_command(['install', drt_host_path])
-        if install_result.find('Success') == -1:
-            self._abort('Failed to install %s onto device: %s' % (drt_host_path, install_result))
-
-    def _push_fonts(self):
-        self._log_debug('Pushing fonts')
-        path_to_ahem_font = self._port._build_path('AHEM____.TTF')
-        self._push_file_if_needed(path_to_ahem_font, DEVICE_FONTS_DIR + 'AHEM____.TTF')
-        for (host_dirs, font_file, package) in HOST_FONT_FILES:
-            for host_dir in host_dirs:
-                host_font_path = host_dir + font_file
-                if self._port._check_file_exists(host_font_path, '', logging=False):
-                    self._push_file_if_needed(host_font_path, DEVICE_FONTS_DIR + font_file)
-
-    def _push_test_resources(self):
-        self._log_debug('Pushing test resources')
-        for resource in TEST_RESOURCES_TO_PUSH:
-            self._push_file_if_needed(self._port.layout_tests_dir() + '/' + resource, DEVICE_LAYOUT_TESTS_DIR + resource)
-
-    def _push_platform_resources(self):
-        self._log_debug('Pushing platform resources')
-        external_storage = self._port._filesystem.join(self._run_adb_command(['shell', 'echo $EXTERNAL_STORAGE']).strip(), 'Source', 'WebKit', 'chromium')
-        for resource in WEBKIT_PLATFORM_RESOURCES_TO_PUSH:
-            self._push_file_if_needed(self._port._chromium_base_dir(self._port._filesystem) + '/' + resource, external_storage + '/' + resource)
-
-    def _restart_adb_as_root(self):
-        output = self._run_adb_command(['root'])
-        if 'adbd is already running as root' in output:
-            return
-        elif not 'restarting adbd as root' in output:
-            self._log_error('Unrecognized output from adb root: %s' % output)
-
-        # Regardless the output, give the device a moment to come back online.
-        self._run_adb_command(['wait-for-device'])
-
-    def _run_adb_command(self, cmd, ignore_error=False):
-        self._log_debug('Run adb command: ' + str(cmd))
-        if ignore_error:
-            error_handler = self._port._executive.ignore_error
-        else:
-            error_handler = None
-        result = self._port._executive.run_command(self._adb_command() + cmd, error_handler=error_handler)
-        # Limit the length to avoid too verbose output of commands like 'adb logcat' and 'cat /data/tombstones/tombstone01'
-        # whose outputs are normally printed in later logs.
-        self._log_debug('Run adb result: ' + result[:80])
-        return result
-
-    def _link_device_file(self, from_file, to_file, ignore_error=False):
-        # rm to_file first to make sure that ln succeeds.
-        self._run_adb_command(['shell', 'rm', to_file], ignore_error)
-        return self._run_adb_command(['shell', 'ln', '-s', from_file, to_file], ignore_error)
-
-    def _push_to_device(self, host_path, device_path, ignore_error=False):
-        return self._run_adb_command(['push', host_path, device_path], ignore_error)
-
-    def _pull_from_device(self, device_path, host_path, ignore_error=False):
-        return self._run_adb_command(['pull', device_path, host_path], ignore_error)
-
-    def _get_last_stacktrace(self):
-        tombstones = self._run_adb_command(['shell', 'ls', '-n', '/data/tombstones'])
-        if not tombstones or tombstones.startswith('/data/tombstones: No such file or directory'):
-            self._log_error('DRT crashed, but no tombstone found!')
-            return ''
-        tombstones = tombstones.rstrip().split('\n')
-        last_tombstone = tombstones[0].split()
-        for tombstone in tombstones[1:]:
-            # Format of fields:
-            # 0          1      2      3     4          5     6
-            # permission uid    gid    size  date       time  filename
-            # -rw------- 1000   1000   45859 2011-04-13 06:00 tombstone_00
-            fields = tombstone.split()
-            if (fields[4] + fields[5] >= last_tombstone[4] + last_tombstone[5]):
-                last_tombstone = fields
-            else:
-                break
-
-        # Use Android tool vendor/google/tools/stack to convert the raw
-        # stack trace into a human readable format, if needed.
-        # It takes a long time, so don't do it here.
-        return '%s\n%s' % (' '.join(last_tombstone),
-                           self._run_adb_command(['shell', 'cat', '/data/tombstones/' + last_tombstone[6]]))
-
-    def _get_logcat(self):
-        return self._run_adb_command(['logcat', '-d', '-v', 'threadtime'])
-
-    def _setup_performance(self):
-        # Disable CPU scaling and drop ram cache to reduce noise in tests
-        if not self._original_governors:
-            governor_files = self._run_adb_command(['shell', 'ls', SCALING_GOVERNORS_PATTERN])
-            if governor_files.find('No such file or directory') == -1:
-                for file in governor_files.split():
-                    self._original_governors[file] = self._run_adb_command(['shell', 'cat', file]).strip()
-                    self._run_adb_command(['shell', 'echo', 'performance', '>', file])
-
-    def _teardown_performance(self):
-        for file, original_content in self._original_governors.items():
-            self._run_adb_command(['shell', 'echo', original_content, '>', file])
-        self._original_governors = {}
-
-    def _get_crash_log(self, stdout, stderr, newer_than):
-        if not stdout:
-            stdout = ''
-        stdout += '********* [%s] Logcat:\n%s' % (self._device_serial, self._get_logcat())
-        if not stderr:
-            stderr = ''
-        stderr += '********* [%s] Tombstone file:\n%s' % (self._device_serial, self._get_last_stacktrace())
-        return super(ChromiumAndroidDriver, self)._get_crash_log(stdout, stderr, newer_than)
-
-    def cmd_line(self, pixel_tests, per_test_args):
-        # The returned command line is used to start _server_process. In our case, it's an interactive 'adb shell'.
-        # The command line passed to the DRT process is returned by _drt_cmd_line() instead.
-        return self._adb_command() + ['shell']
-
-    def _file_exists_on_device(self, full_file_path):
-        assert full_file_path.startswith('/')
-        return self._run_adb_command(['shell', 'ls', full_file_path]).strip() == full_file_path
-
-    def _drt_cmd_line(self, pixel_tests, per_test_args):
-        return driver.Driver.cmd_line(self, pixel_tests, per_test_args) + ['--create-stdin-fifo', '--separate-stderr-fifo']
-
-    @staticmethod
-    def _loop_with_timeout(condition, timeout_secs):
-        deadline = time.time() + timeout_secs
-        while time.time() < deadline:
-            if condition():
-                return True
-        return False
-
-    def _all_pipes_created(self):
-        return (self._file_exists_on_device(self._in_fifo_path) and
-                self._file_exists_on_device(self._out_fifo_path) and
-                self._file_exists_on_device(self._err_fifo_path))
-
-    def _remove_all_pipes(self):
-        for file in [self._in_fifo_path, self._out_fifo_path, self._err_fifo_path]:
-            self._run_adb_command(['shell', 'rm', file])
-
-        return (not self._file_exists_on_device(self._in_fifo_path) and
-                not self._file_exists_on_device(self._out_fifo_path) and
-                not self._file_exists_on_device(self._err_fifo_path))
-
-    def run_test(self, driver_input, stop_when_done):
-        base = self._port.lookup_virtual_test_base(driver_input.test_name)
-        if base:
-            driver_input = copy.copy(driver_input)
-            driver_input.args = self._port.lookup_virtual_test_args(driver_input.test_name)
-            driver_input.test_name = base
-        return super(ChromiumAndroidDriver, self).run_test(driver_input, stop_when_done)
-
-    def start(self, pixel_tests, per_test_args):
-        # Only one driver instance is allowed because of the nature of Android activity.
-        # The single driver needs to restart DumpRenderTree when the command line changes.
-        cmd_line = self._drt_cmd_line(pixel_tests, per_test_args)
-        if cmd_line != self._cmd_line:
-            self.stop()
-            self._cmd_line = cmd_line
-        super(ChromiumAndroidDriver, self).start(pixel_tests, per_test_args)
-
-    def _start(self, pixel_tests, per_test_args):
-        self._setup_test()
-
-        for retries in range(3):
-            if self._start_once(pixel_tests, per_test_args):
-                return
-            self._log_error('Failed to start DumpRenderTree application. Retries=%d. Log:%s' % (retries, self._get_logcat()))
-            self.stop()
-            time.sleep(2)
-        self._abort('Failed to start DumpRenderTree application multiple times. Give up.')
-
-    def _start_once(self, pixel_tests, per_test_args):
-        super(ChromiumAndroidDriver, self)._start(pixel_tests, per_test_args)
-
-        self._log_debug('Starting forwarder')
-        self._forwarder_process = self._port._server_process_constructor(
-            self._port, 'Forwarder', self._adb_command() + ['shell', '%s -D %s' % (DEVICE_FORWARDER_PATH, FORWARD_PORTS)])
-        self._forwarder_process.start()
-
-        self._run_adb_command(['logcat', '-c'])
-        self._run_adb_command(['shell', 'echo'] + self._cmd_line + ['>', COMMAND_LINE_FILE])
-        start_result = self._run_adb_command(['shell', 'am', 'start', '-e', 'RunInSubThread', '-n', DRT_ACTIVITY_FULL_NAME])
-        if start_result.find('Exception') != -1:
-            self._log_error('Failed to start DumpRenderTree application. Exception:\n' + start_result)
-            return False
-
-        if not ChromiumAndroidDriver._loop_with_timeout(self._all_pipes_created, DRT_START_STOP_TIMEOUT_SECS):
-            return False
-
-        # Read back the shell prompt to ensure adb shell ready.
-        deadline = time.time() + DRT_START_STOP_TIMEOUT_SECS
-        self._server_process.start()
-        self._read_prompt(deadline)
-        self._log_debug('Interactive shell started')
-
-        # Start a process to read from the stdout fifo of the DumpRenderTree app and print to stdout.
-        self._log_debug('Redirecting stdout to ' + self._out_fifo_path)
-        self._read_stdout_process = self._port._server_process_constructor(
-            self._port, 'ReadStdout', self._adb_command() + ['shell', 'cat', self._out_fifo_path])
-        self._read_stdout_process.start()
-
-        # Start a process to read from the stderr fifo of the DumpRenderTree app and print to stdout.
-        self._log_debug('Redirecting stderr to ' + self._err_fifo_path)
-        self._read_stderr_process = self._port._server_process_constructor(
-            self._port, 'ReadStderr', self._adb_command() + ['shell', 'cat', self._err_fifo_path])
-        self._read_stderr_process.start()
-
-        self._log_debug('Redirecting stdin to ' + self._in_fifo_path)
-        self._server_process.write('cat >%s\n' % self._in_fifo_path)
-
-        # Combine the stdout and stderr pipes into self._server_process.
-        self._server_process.replace_outputs(self._read_stdout_process._proc.stdout, self._read_stderr_process._proc.stdout)
-
-        def deadlock_detector(processes, normal_startup_event):
-            if not ChromiumAndroidDriver._loop_with_timeout(lambda: normal_startup_event.is_set(), DRT_START_STOP_TIMEOUT_SECS):
-                # If normal_startup_event is not set in time, the main thread must be blocked at
-                # reading/writing the fifo. Kill the fifo reading/writing processes to let the
-                # main thread escape from the deadlocked state. After that, the main thread will
-                # treat this as a crash.
-                self._log_error('Deadlock detected. Processes killed.')
-                for i in processes:
-                    i.kill()
-
-        # Start a thread to kill the pipe reading/writing processes on deadlock of the fifos during startup.
-        normal_startup_event = threading.Event()
-        threading.Thread(name='DeadlockDetector', target=deadlock_detector,
-                         args=([self._server_process, self._read_stdout_process, self._read_stderr_process], normal_startup_event)).start()
-
-        output = ''
-        line = self._server_process.read_stdout_line(deadline)
-        while not self._server_process.timed_out and not self.has_crashed() and line.rstrip() != '#READY':
-            output += line
-            line = self._server_process.read_stdout_line(deadline)
-
-        if self._server_process.timed_out and not self.has_crashed():
-            # DumpRenderTree crashes during startup, or when the deadlock detector detected
-            # deadlock and killed the fifo reading/writing processes.
-            _log.error('Failed to start DumpRenderTree: \n%s' % output)
-            return False
-
-        # Inform the deadlock detector that the startup is successful without deadlock.
-        normal_startup_event.set()
-        return True
-
-    def _pid_from_android_ps_output(self, ps_output, package_name):
-        # ps output seems to be fixed width, we only care about the name and the pid
-        # u0_a72    21630 125   947920 59364 ffffffff 400beee4 S org.chromium.native_test
-        for line in ps_output.split('\n'):
-            if line.find(DRT_APP_PACKAGE) != -1:
-                match = re.match(r'\S+\s+(\d+)', line)
-                return int(match.group(1))
-
-    def _pid_on_target(self):
-        # FIXME: There must be a better way to do this than grepping ps output!
-        ps_output = self._run_adb_command(['shell', 'ps'])
-        return self._pid_from_android_ps_output(ps_output, DRT_APP_PACKAGE)
-
-    def stop(self):
-        self._run_adb_command(['shell', 'am', 'force-stop', DRT_APP_PACKAGE])
-
-        if self._read_stdout_process:
-            self._read_stdout_process.kill()
-            self._read_stdout_process = None
-
-        if self._read_stderr_process:
-            self._read_stderr_process.kill()
-            self._read_stderr_process = None
-
-        super(ChromiumAndroidDriver, self).stop()
-
-        if self._forwarder_process:
-            self._forwarder_process.kill()
-            self._forwarder_process = None
-
-        if self._has_setup:
-            if not ChromiumAndroidDriver._loop_with_timeout(self._remove_all_pipes, DRT_START_STOP_TIMEOUT_SECS):
-                raise AssertionError('Failed to remove fifo files. May be locked.')
-
-    def _command_from_driver_input(self, driver_input):
-        command = super(ChromiumAndroidDriver, self)._command_from_driver_input(driver_input)
-        if command.startswith('/'):
-            fs = self._port._filesystem
-            # FIXME: what happens if command lies outside of the layout_tests_dir on the host?
-            relative_test_filename = fs.relpath(command, fs.dirname(self._port.layout_tests_dir()))
-            command = DEVICE_WEBKIT_BASE_DIR + relative_test_filename
-        return command
-
-    def _read_prompt(self, deadline):
-        last_char = ''
-        while True:
-            current_char = self._server_process.read_stdout(deadline, 1)
-            if current_char == ' ':
-                if last_char in ('#', '$'):
-                    return
-            last_char = current_char
-
-    def _adb_command(self):
-        if not self._adb_command_base:
-            self._adb_command_base = [self._port.path_to_adb(), '-s', self._device_serial]
-        return self._adb_command_base
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
deleted file mode 100644 (file)
index f34bbcd..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-# Copyright (C) 2012 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import optparse
-import StringIO
-import time
-import unittest2 as unittest
-import sys
-
-from webkitpy.common.system import executive_mock
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-
-from webkitpy.layout_tests.port import chromium_android
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port import driver
-from webkitpy.layout_tests.port import driver_unittest
-from webkitpy.tool.mocktool import MockOptions
-
-
-class MockRunCommand(object):
-    def __init__(self):
-        self._mock_logcat = ''
-        self._mock_devices_output = ''
-        self._mock_devices = []
-        self._mock_ls_tombstones = ''
-
-    def mock_run_command_fn(self, args):
-        if not args[0].endswith('adb'):
-            return ''
-        if args[1] == 'devices':
-            return self._mock_devices_output
-        if args[1] == 'version':
-            return 'version 1.0'
-
-        assert len(args) > 3
-        assert args[1] == '-s'
-        assert args[2] in self._mock_devices
-        if args[3] == 'shell':
-            if args[4:] == ['ls', '-n', '/data/tombstones']:
-                return self._mock_ls_tombstones
-            elif args[4] == 'cat':
-                return args[5] + '\nmock_contents\n'
-        elif args[3] == 'logcat':
-            return self._mock_logcat
-        return ''
-
-    def mock_no_device(self):
-        self._mock_devices = []
-        self._mock_devices_output = 'List of devices attached'
-
-    def mock_one_device(self):
-        self._mock_devices = ['123456789ABCDEF0']
-        self._mock_devices_output = ('List of devices attached\n'
-                                     '%s\tdevice\n' % self._mock_devices[0])
-
-    def mock_two_devices(self):
-        self._mock_devices = ['123456789ABCDEF0', '23456789ABCDEF01']
-        self._mock_devices_output = ('* daemon not running. starting it now on port 5037 *'
-                                     '* daemon started successfully *'
-                                     'List of devices attached\n'
-                                     '%s\tdevice\n'
-                                     '%s\tdevice\n' % (self._mock_devices[0], self._mock_devices[1]))
-
-    def mock_no_tombstone_dir(self):
-        self._mock_ls_tombstones = '/data/tombstones: No such file or directory'
-
-    def mock_no_tombstone_file(self):
-        self._mock_ls_tombstones = ''
-
-    def mock_ten_tombstones(self):
-        self._mock_ls_tombstones = ('-rw------- 1000     1000       218643 2012-04-26 18:15 tombstone_00\n'
-                                    '-rw------- 1000     1000       241695 2012-04-26 18:15 tombstone_01\n'
-                                    '-rw------- 1000     1000       219472 2012-04-26 18:16 tombstone_02\n'
-                                    '-rw------- 1000     1000        45316 2012-04-27 16:33 tombstone_03\n'
-                                    '-rw------- 1000     1000        82022 2012-04-23 16:57 tombstone_04\n'
-                                    '-rw------- 1000     1000        82015 2012-04-23 16:57 tombstone_05\n'
-                                    '-rw------- 1000     1000        81974 2012-04-23 16:58 tombstone_06\n'
-                                    '-rw------- 1000     1000       237409 2012-04-26 17:41 tombstone_07\n'
-                                    '-rw------- 1000     1000       276089 2012-04-26 18:15 tombstone_08\n'
-                                    '-rw------- 1000     1000       219618 2012-04-26 18:15 tombstone_09\n')
-
-    def mock_logcat(self, content):
-        self._mock_logcat = content
-
-
-class ChromiumAndroidPortTest(chromium_port_testcase.ChromiumPortTestCase):
-    port_name = 'chromium-android'
-    port_maker = chromium_android.ChromiumAndroidPort
-
-    def make_port(self, **kwargs):
-        port = super(ChromiumAndroidPortTest, self).make_port(**kwargs)
-        self.mock_run_command = MockRunCommand()
-        self.mock_run_command.mock_one_device()
-        port._executive = MockExecutive2(run_command_fn=self.mock_run_command.mock_run_command_fn)
-        return port
-
-    def test_attributes(self):
-        port = self.make_port()
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-android'))
-
-    def test_default_timeout_ms(self):
-        self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Release'})).default_timeout_ms(), 10000)
-        self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Debug'})).default_timeout_ms(), 10000)
-
-    def test_expectations_files(self):
-        # FIXME: override this test temporarily while we're still upstreaming the android port and
-        # using a custom expectations file.
-        pass
-
-    def test_get_devices_no_device(self):
-        port = self.make_port()
-        self.mock_run_command.mock_no_device()
-        self.assertRaises(AssertionError, port._get_devices)
-
-    def test_get_devices_one_device(self):
-        port = self.make_port()
-        self.mock_run_command.mock_one_device()
-        self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
-        self.assertEqual(1, port.default_child_processes())
-
-    def test_get_devices_two_devices(self):
-        port = self.make_port()
-        self.mock_run_command.mock_two_devices()
-        self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
-        self.assertEqual(2, port.default_child_processes())
-
-    def test_get_device_serial_no_device(self):
-        port = self.make_port()
-        self.mock_run_command.mock_no_device()
-        self.assertRaises(AssertionError, port._get_device_serial, 0)
-
-    def test_get_device_serial_one_device(self):
-        port = self.make_port()
-        self.mock_run_command.mock_one_device()
-        self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
-        self.assertRaises(AssertionError, port._get_device_serial, 1)
-
-    def test_get_device_serial_two_devices(self):
-        port = self.make_port()
-        self.mock_run_command.mock_two_devices()
-        self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
-        self.assertEqual(self.mock_run_command._mock_devices[1], port._get_device_serial(1))
-        self.assertRaises(AssertionError, port._get_device_serial, 2)
-
-    def test_must_require_http_server(self):
-        port = self.make_port()
-        self.assertEqual(port.requires_http_server(), True)
-
-
-class ChromiumAndroidDriverTest(unittest.TestCase):
-    def setUp(self):
-        self.mock_run_command = MockRunCommand()
-        self.mock_run_command.mock_one_device()
-        self.port = chromium_android.ChromiumAndroidPort(
-                MockSystemHost(executive=MockExecutive2(run_command_fn=self.mock_run_command.mock_run_command_fn)),
-                'chromium-android')
-        self.driver = chromium_android.ChromiumAndroidDriver(self.port, worker_number=0, pixel_tests=True)
-
-    def test_get_last_stacktrace(self):
-        self.mock_run_command.mock_no_tombstone_dir()
-        self.assertEqual(self.driver._get_last_stacktrace(), '')
-
-        self.mock_run_command.mock_no_tombstone_file()
-        self.assertEqual(self.driver._get_last_stacktrace(), '')
-
-        self.mock_run_command.mock_ten_tombstones()
-        self.assertEqual(self.driver._get_last_stacktrace(),
-                          '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
-                          '/data/tombstones/tombstone_03\nmock_contents\n')
-
-    def test_get_crash_log(self):
-        self.mock_run_command.mock_logcat('logcat contents\n')
-        self.mock_run_command.mock_ten_tombstones()
-        self.driver._crashed_process_name = 'foo'
-        self.driver._crashed_pid = 1234
-        self.assertEqual(self.driver._get_crash_log('out bar\nout baz\n', 'err bar\nerr baz\n', newer_than=None),
-            ('err bar\n'
-             'err baz\n'
-             '********* [123456789ABCDEF0] Tombstone file:\n'
-             '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
-             '/data/tombstones/tombstone_03\n'
-             'mock_contents\n',
-             u'crash log for foo (pid 1234):\n'
-             u'STDOUT: out bar\n'
-             u'STDOUT: out baz\n'
-             u'STDOUT: ********* [123456789ABCDEF0] Logcat:\n'
-             u'STDOUT: logcat contents\n'
-             u'STDERR: err bar\n'
-             u'STDERR: err baz\n'
-             u'STDERR: ********* [123456789ABCDEF0] Tombstone file:\n'
-             u'STDERR: -rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
-             u'STDERR: /data/tombstones/tombstone_03\n'
-             u'STDERR: mock_contents\n'))
-
-        self.driver._crashed_process_name = None
-        self.driver._crashed_pid = None
-        self.assertEqual(self.driver._get_crash_log(None, None, newer_than=None),
-            ('********* [123456789ABCDEF0] Tombstone file:\n'
-             '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
-             '/data/tombstones/tombstone_03\n'
-             'mock_contents\n',
-             u'crash log for <unknown process name> (pid <unknown>):\n'
-             u'STDOUT: ********* [123456789ABCDEF0] Logcat:\n'
-             u'STDOUT: logcat contents\n'
-             u'STDERR: ********* [123456789ABCDEF0] Tombstone file:\n'
-             u'STDERR: -rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
-             u'STDERR: /data/tombstones/tombstone_03\n'
-             u'STDERR: mock_contents\n'))
-
-    def test_cmd_line(self):
-        cmd_line = self.driver.cmd_line(True, ['anything'])
-        self.assertEqual(['adb', '-s', self.mock_run_command._mock_devices[0], 'shell'], cmd_line)
-
-    def test_drt_cmd_line(self):
-        cmd_line = self.driver._drt_cmd_line(True, ['--a'])
-        self.assertIn('--a', cmd_line)
-        self.assertIn('--create-stdin-fifo', cmd_line)
-        self.assertIn('--separate-stderr-fifo', cmd_line)
-
-    def test_read_prompt(self):
-        self.driver._server_process = driver_unittest.MockServerProcess(lines=['root@android:/ # '])
-        self.assertIsNone(self.driver._read_prompt(time.time() + 1))
-        self.driver._server_process = driver_unittest.MockServerProcess(lines=['$ '])
-        self.assertIsNone(self.driver._read_prompt(time.time() + 1))
-
-    def test_command_from_driver_input(self):
-        driver_input = driver.DriverInput('foo/bar/test.html', 10, 'checksum', True)
-        expected_command = "/data/local/tmp/third_party/WebKit/LayoutTests/foo/bar/test.html'--pixel-test'checksum\n"
-        if (sys.platform != "cygwin"):
-            self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
-
-        driver_input = driver.DriverInput('http/tests/foo/bar/test.html', 10, 'checksum', True)
-        expected_command = "http://127.0.0.1:8000/foo/bar/test.html'--pixel-test'checksum\n"
-        self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
-
-    def test_pid_from_android_ps_output(self):
-        # FIXME: Use a larger blob of ps output.
-        ps_output = """u0_a72    21630 125   947920 59364 ffffffff 400beee4 S org.chromium.native_test"""
-        pid = self.driver._pid_from_android_ps_output(ps_output, "org.chromium.native_test")
-        self.assertEqual(pid, 21630)
-
-
-class AndroidPerfTest(unittest.TestCase):
-    def test_perf_output_regexp(self):
-        perf_output = """[kernel.kallsyms] with build id 5a20f6299bdb955a2f07711bb7f65cd706fe7469 not found, continuing without symbols
-Failed to open /tmp/perf-14168.map, continuing without symbols
-Kernel address maps (/proc/{kallsyms,modules}) were restricted.
-
-Check /proc/sys/kernel/kptr_restrict before running 'perf record'.
-
-As no suitable kallsyms nor vmlinux was found, kernel samples
-can't be resolved.
-
-Samples in kernel modules can't be resolved as well.
-
-# Events: 31K cycles
-#
-# Overhead          Command                Shared Object
-# ........  ...............  ...........................  .....................................................................................................................................................................
-#
-    16.18%   DumpRenderTree  perf-14168.map               [.] 0x21270ac0cf43
-    12.72%   DumpRenderTree  DumpRenderTree               [.] v8::internal::JSObject::GetElementWithInterceptor(v8::internal::Object*, unsigned int)
-     8.28%   DumpRenderTree  DumpRenderTree               [.] v8::internal::LoadPropertyWithInterceptorOnly(v8::internal::Arguments, v8::internal::Isolate*)
-     5.60%   DumpRenderTree  DumpRenderTree               [.] WTF::AtomicString WebCore::v8StringToWebCoreString<WTF::AtomicString>(v8::Handle<v8::String>, WebCore::ExternalMode)
-     4.60%   DumpRenderTree  DumpRenderTree               [.] WebCore::WeakReferenceMap<void, v8::Object>::get(void*)
-     3.99%   DumpRenderTree  DumpRenderTree               [.] _ZNK3WTF7HashMapIPNS_16AtomicStringImplEPN7WebCore7ElementENS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS8_IS5_EEE3getERKS2_.isra.98
-     3.69%   DumpRenderTree  DumpRenderTree               [.] WebCore::DocumentV8Internal::getElementByIdCallback(v8::Arguments const&)
-     3.23%   DumpRenderTree  DumpRenderTree               [.] WebCore::V8ParameterBase::prepareBase()
-     2.83%   DumpRenderTree  DumpRenderTree               [.] WTF::AtomicString::add(unsigned short const*, unsigned int)
-     2.73%   DumpRenderTree  DumpRenderTree               [.] WebCore::DocumentV8Internal::getElementsByTagNameCallback(v8::Arguments const&)
-     2.47%   DumpRenderTree  DumpRenderTree               [.] _ZN2v86Object27GetPointerFromInternalFieldEi.constprop.439
-     2.43%   DumpRenderTree  DumpRenderTree               [.] v8::internal::Isolate::SetCurrentVMState(v8::internal::StateTag)
-"""
-        expected_first_ten_lines = """    16.18%   DumpRenderTree  perf-14168.map               [.] 0x21270ac0cf43
-    12.72%   DumpRenderTree  DumpRenderTree               [.] v8::internal::JSObject::GetElementWithInterceptor(v8::internal::Object*, unsigned int)
-     8.28%   DumpRenderTree  DumpRenderTree               [.] v8::internal::LoadPropertyWithInterceptorOnly(v8::internal::Arguments, v8::internal::Isolate*)
-     5.60%   DumpRenderTree  DumpRenderTree               [.] WTF::AtomicString WebCore::v8StringToWebCoreString<WTF::AtomicString>(v8::Handle<v8::String>, WebCore::ExternalMode)
-     4.60%   DumpRenderTree  DumpRenderTree               [.] WebCore::WeakReferenceMap<void, v8::Object>::get(void*)
-     3.99%   DumpRenderTree  DumpRenderTree               [.] _ZNK3WTF7HashMapIPNS_16AtomicStringImplEPN7WebCore7ElementENS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS8_IS5_EEE3getERKS2_.isra.98
-     3.69%   DumpRenderTree  DumpRenderTree               [.] WebCore::DocumentV8Internal::getElementByIdCallback(v8::Arguments const&)
-     3.23%   DumpRenderTree  DumpRenderTree               [.] WebCore::V8ParameterBase::prepareBase()
-     2.83%   DumpRenderTree  DumpRenderTree               [.] WTF::AtomicString::add(unsigned short const*, unsigned int)
-     2.73%   DumpRenderTree  DumpRenderTree               [.] WebCore::DocumentV8Internal::getElementsByTagNameCallback(v8::Arguments const&)
-"""
-        host = MockSystemHost()
-        profiler = chromium_android.AndroidPerf(host, '/bin/executable', '/tmp/output', 'adb-path', 'device-serial', '/tmp/symfs', '/tmp/kallsyms', 'foo')
-        self.assertEqual(profiler._first_ten_lines_of_profile(perf_output), expected_first_ten_lines)
-
-
-class ChromiumAndroidDriverTwoDriversTest(unittest.TestCase):
-    def test_two_drivers(self):
-        mock_run_command = MockRunCommand()
-        mock_run_command.mock_two_devices()
-        port = chromium_android.ChromiumAndroidPort(
-                MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
-                'chromium-android')
-        driver0 = chromium_android.ChromiumAndroidDriver(port, worker_number=0, pixel_tests=True)
-        driver1 = chromium_android.ChromiumAndroidDriver(port, worker_number=1, pixel_tests=True)
-
-        cmd_line0 = driver0.cmd_line(True, ['anything'])
-        self.assertEqual(['adb', '-s', mock_run_command._mock_devices[0], 'shell'], cmd_line0)
-
-        cmd_line1 = driver1.cmd_line(True, ['anything'])
-        self.assertEqual(['adb', '-s', mock_run_command._mock_devices[1], 'shell'], cmd_line1)
-
-
-class ChromiumAndroidTwoPortsTest(unittest.TestCase):
-    def test_options_with_two_ports(self):
-        options = MockOptions(additional_drt_flag=['--foo=bar', '--foo=baz'])
-        mock_run_command = MockRunCommand()
-        mock_run_command.mock_two_devices()
-        port0 = chromium_android.ChromiumAndroidPort(
-                MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
-                'chromium-android', options=options)
-        port1 = chromium_android.ChromiumAndroidPort(
-                MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
-                'chromium-android', options=options)
-        cmd_line = port1.driver_cmd_line()
-        self.assertEqual(cmd_line.count('--encode-binary'), 1)
-        self.assertEqual(cmd_line.count('--enable-hardware-gpu'), 1)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
deleted file mode 100644 (file)
index 1d88db7..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import logging
-
-from webkitpy.common.webkit_finder import WebKitFinder
-from webkitpy.layout_tests.port import chromium
-from webkitpy.layout_tests.port import config
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumLinuxPort(chromium.ChromiumPort):
-    port_name = 'chromium-linux'
-
-    SUPPORTED_ARCHITECTURES = ('x86', 'x86_64')
-
-    FALLBACK_PATHS = {
-        'x86_64': [
-            'chromium-linux',
-            'chromium-win',
-            'chromium',
-        ],
-        'x86': [
-            'chromium-linux-x86',
-            'chromium-linux',
-            'chromium-win',
-            'chromium',
-        ],
-    }
-
-    DEFAULT_BUILD_DIRECTORIES = ('sconsbuild', 'out')
-
-    @classmethod
-    def _determine_driver_path_statically(cls, host, options):
-        config_object = config.Config(host.executive, host.filesystem)
-        build_directory = getattr(options, 'build_directory', None)
-        webkit_base = WebKitFinder(host.filesystem).webkit_base()
-        chromium_base = cls._chromium_base_dir(host.filesystem)
-        if hasattr(options, 'configuration') and options.configuration:
-            configuration = options.configuration
-        else:
-            configuration = config_object.default_configuration()
-        return cls._static_build_path(host.filesystem, build_directory, chromium_base, webkit_base, configuration, ['DumpRenderTree'])
-
-    @staticmethod
-    def _determine_architecture(filesystem, executive, driver_path):
-        file_output = ''
-        if filesystem.exists(driver_path):
-            # The --dereference flag tells file to follow symlinks
-            file_output = executive.run_command(['file', '--dereference', driver_path], return_stderr=True)
-
-        if 'ELF 32-bit LSB executable' in file_output:
-            return 'x86'
-        if 'ELF 64-bit LSB executable' in file_output:
-            return 'x86_64'
-        if file_output:
-            _log.warning('Could not determine architecture from "file" output: %s' % file_output)
-
-        # We don't know what the architecture is; default to 'x86' because
-        # maybe we're rebaselining and the binary doesn't actually exist,
-        # or something else weird is going on. It's okay to do this because
-        # if we actually try to use the binary, check_build() should fail.
-        return 'x86_64'
-
-    @classmethod
-    def determine_full_port_name(cls, host, options, port_name):
-        if port_name.endswith('-linux'):
-            return port_name + '-' + cls._determine_architecture(host.filesystem, host.executive, cls._determine_driver_path_statically(host, options))
-        return port_name
-
-    def __init__(self, host, port_name, **kwargs):
-        chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
-        (base, arch) = port_name.rsplit('-', 1)
-        assert base == 'chromium-linux'
-        assert arch in self.SUPPORTED_ARCHITECTURES
-        assert port_name in ('chromium-linux', 'chromium-linux-x86', 'chromium-linux-x86_64')
-        self._version = 'lucid'  # We only support lucid right now.
-        self._architecture = arch
-
-    def default_baseline_search_path(self):
-        port_names = self.FALLBACK_PATHS[self._architecture]
-        return map(self._webkit_baseline_path, port_names)
-
-    def _modules_to_search_for_symbols(self):
-        return [self._build_path('libffmpegsumo.so')]
-
-    def check_build(self, needs_http):
-        result = chromium.ChromiumPort.check_build(self, needs_http)
-        if not result:
-            _log.error('For complete Linux build requirements, please see:')
-            _log.error('')
-            _log.error('    http://code.google.com/p/chromium/wiki/LinuxBuildInstructions')
-        return result
-
-    def operating_system(self):
-        return 'linux'
-
-    #
-    # PROTECTED METHODS
-    #
-
-    def _check_apache_install(self):
-        result = self._check_file_exists(self._path_to_apache(), "apache2")
-        result = self._check_file_exists(self._path_to_apache_config_file(), "apache2 config file") and result
-        if not result:
-            _log.error('    Please install using: "sudo apt-get install apache2 libapache2-mod-php5"')
-            _log.error('')
-        return result
-
-    def _check_lighttpd_install(self):
-        result = self._check_file_exists(
-            self._path_to_lighttpd(), "LigHTTPd executable")
-        result = self._check_file_exists(self._path_to_lighttpd_php(), "PHP CGI executable") and result
-        result = self._check_file_exists(self._path_to_lighttpd_modules(), "LigHTTPd modules") and result
-        if not result:
-            _log.error('    Please install using: "sudo apt-get install lighttpd php5-cgi"')
-            _log.error('')
-        return result
-
-    def _wdiff_missing_message(self):
-        return 'wdiff is not installed; please install using "sudo apt-get install wdiff"'
-
-    def _path_to_apache(self):
-        if self._is_redhat_based():
-            return '/usr/sbin/httpd'
-        else:
-            return '/usr/sbin/apache2'
-
-    def _path_to_lighttpd(self):
-        return "/usr/sbin/lighttpd"
-
-    def _path_to_lighttpd_modules(self):
-        return "/usr/lib/lighttpd"
-
-    def _path_to_lighttpd_php(self):
-        return "/usr/bin/php-cgi"
-
-    def _path_to_driver(self, configuration=None):
-        binary_name = self.driver_name()
-        return self._build_path_with_configuration(configuration, binary_name)
-
-    def _path_to_helper(self):
-        return None
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py
deleted file mode 100644 (file)
index 308d02f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest2 as unittest
-
-from webkitpy.common.system import executive_mock
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.tool.mocktool import MockOptions
-
-from webkitpy.layout_tests.port import chromium_linux
-from webkitpy.layout_tests.port import chromium_port_testcase
-
-
-class ChromiumLinuxPortTest(chromium_port_testcase.ChromiumPortTestCase):
-    port_name = 'chromium-linux'
-    port_maker = chromium_linux.ChromiumLinuxPort
-
-    def assert_architecture(self, port_name=None, file_output=None, expected_architecture=None):
-        host = MockSystemHost()
-        host.filesystem.exists = lambda x: 'DumpRenderTree' in x
-        if file_output:
-            host.executive = executive_mock.MockExecutive2(file_output)
-
-        port = self.make_port(host, port_name=port_name)
-        self.assertEqual(port.architecture(), expected_architecture)
-        if expected_architecture == 'x86':
-            self.assertTrue(port.baseline_path().endswith('chromium-linux-x86'))
-            self.assertTrue(port.baseline_search_path()[0].endswith('chromium-linux-x86'))
-            self.assertTrue(port.baseline_search_path()[1].endswith('chromium-linux'))
-        else:
-            self.assertTrue(port.baseline_path().endswith('chromium-linux'))
-            self.assertTrue(port.baseline_search_path()[0].endswith('chromium-linux'))
-
-    def test_architectures(self):
-        self.assert_architecture(port_name='chromium-linux-x86',
-                                 expected_architecture='x86')
-        self.assert_architecture(port_name='chromium-linux-x86_64',
-                                 expected_architecture='x86_64')
-        self.assert_architecture(file_output='ELF 32-bit LSB executable',
-                                 expected_architecture='x86')
-        self.assert_architecture(file_output='ELF 64-bit LSB executable',
-                                 expected_architecture='x86_64')
-
-    def test_check_illegal_port_names(self):
-        # FIXME: Check that, for now, these are illegal port names.
-        # Eventually we should be able to do the right thing here.
-        self.assertRaises(AssertionError, chromium_linux.ChromiumLinuxPort, MockSystemHost(), port_name='chromium-x86-linux')
-
-    def test_determine_architecture_fails(self):
-        # Test that we default to 'x86' if the driver doesn't exist.
-        port = self.make_port()
-        self.assertEqual(port.architecture(), 'x86_64')
-
-        # Test that we default to 'x86' on an unknown architecture.
-        host = MockSystemHost()
-        host.filesystem.exists = lambda x: True
-        host.executive = executive_mock.MockExecutive2('win32')
-        port = self.make_port(host=host)
-        self.assertEqual(port.architecture(), 'x86_64')
-
-        # Test that we raise errors if something weird happens.
-        host.executive = executive_mock.MockExecutive2(exception=AssertionError)
-        self.assertRaises(AssertionError, chromium_linux.ChromiumLinuxPort, host, self.port_name)
-
-    def test_operating_system(self):
-        self.assertEqual('linux', self.make_port().operating_system())
-
-    def test_build_path(self):
-        # Test that optional paths are used regardless of whether they exist.
-        options = MockOptions(configuration='Release', build_directory='/foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
-        # Test that optional relative paths are returned unmodified.
-        options = MockOptions(configuration='Release', build_directory='foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
-        # Test that we prefer the legacy dir over the new dir.
-        options = MockOptions(configuration='Release', build_directory=None)
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/sconsbuild/Release', '/mock-checkout/Source/WebKit/chromium/out/Release'], '/mock-checkout/Source/WebKit/chromium/sconsbuild/Release')
-
-    def test_driver_name_option(self):
-        self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree'))
-        self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
-
-    def test_path_to_image_diff(self):
-        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
deleted file mode 100644 (file)
index 39de529..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Chromium Mac implementation of the Port interface."""
-
-import logging
-import signal
-
-from webkitpy.layout_tests.port import chromium
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumMacPort(chromium.ChromiumPort):
-    SUPPORTED_OS_VERSIONS = ('snowleopard', 'lion', 'mountainlion', 'future')
-    port_name = 'chromium-mac'
-
-    FALLBACK_PATHS = {
-        'snowleopard': [
-            'chromium-mac-snowleopard',
-            'chromium-mac-lion',
-            'chromium-mac',
-            'chromium',
-        ],
-        'lion': [
-            'chromium-mac-lion',
-            'chromium-mac',
-            'chromium',
-        ],
-        'mountainlion': [
-            'chromium-mac',
-            'chromium',
-        ],
-        'future': [
-            'chromium-mac',
-            'chromium',
-        ],
-    }
-
-    DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out')
-
-    @classmethod
-    def determine_full_port_name(cls, host, options, port_name):
-        if port_name.endswith('-mac'):
-            return port_name + '-' + host.platform.os_version
-        return port_name
-
-    def __init__(self, host, port_name, **kwargs):
-        chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
-        self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):]
-        assert self._version in self.SUPPORTED_OS_VERSIONS
-
-    def _modules_to_search_for_symbols(self):
-        return [self._build_path('ffmpegsumo.so')]
-
-    def check_build(self, needs_http):
-        result = chromium.ChromiumPort.check_build(self, needs_http)
-        if not result:
-            _log.error('For complete Mac build requirements, please see:')
-            _log.error('')
-            _log.error('    http://code.google.com/p/chromium/wiki/MacBuildInstructions')
-
-        return result
-
-    def operating_system(self):
-        return 'mac'
-
-    #
-    # PROTECTED METHODS
-    #
-
-    def _lighttpd_path(self, *comps):
-        return self.path_from_chromium_base('third_party', 'lighttpd', 'mac', *comps)
-
-    def _wdiff_missing_message(self):
-        return 'wdiff is not installed; please install from MacPorts or elsewhere'
-
-    def _path_to_apache(self):
-        return '/usr/sbin/httpd'
-
-    def _path_to_apache_config_file(self):
-        return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'apache2-httpd.conf')
-
-    def _path_to_lighttpd(self):
-        return self._lighttpd_path('bin', 'lighttpd')
-
-    def _path_to_lighttpd_modules(self):
-        return self._lighttpd_path('lib')
-
-    def _path_to_lighttpd_php(self):
-        return self._lighttpd_path('bin', 'php-cgi')
-
-    def _path_to_driver(self, configuration=None):
-        # FIXME: make |configuration| happy with case-sensitive file systems.
-        return self._build_path_with_configuration(configuration, self.driver_name() + '.app', 'Contents', 'MacOS', self.driver_name())
-
-    def _path_to_helper(self):
-        binary_name = 'LayoutTestHelper'
-        return self._build_path(binary_name)
-
-    def _path_to_wdiff(self):
-        return 'wdiff'
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
deleted file mode 100644 (file)
index bf2ff8f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest2 as unittest
-
-from webkitpy.layout_tests.port import chromium_mac
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.tool.mocktool import MockOptions
-
-
-class ChromiumMacPortTest(chromium_port_testcase.ChromiumPortTestCase):
-    os_name = 'mac'
-    os_version = 'snowleopard'
-    port_name = 'chromium-mac'
-    port_maker = chromium_mac.ChromiumMacPort
-
-    def assert_name(self, port_name, os_version_string, expected):
-        port = self.make_port(os_version=os_version_string, port_name=port_name)
-        self.assertEqual(expected, port.name())
-
-    def test_versions(self):
-        self.assertTrue(self.make_port().name() in ('chromium-mac-snowleopard', 'chromium-mac-lion', 'chromium-mac-mountainlion', 'chromium-mac-future'))
-
-        self.assert_name(None, 'snowleopard', 'chromium-mac-snowleopard')
-        self.assert_name('chromium-mac', 'snowleopard', 'chromium-mac-snowleopard')
-        self.assert_name('chromium-mac-snowleopard', 'leopard', 'chromium-mac-snowleopard')
-        self.assert_name('chromium-mac-snowleopard', 'snowleopard', 'chromium-mac-snowleopard')
-
-        self.assert_name(None, 'lion', 'chromium-mac-lion')
-        self.assert_name(None, 'mountainlion', 'chromium-mac-mountainlion')
-        self.assert_name(None, 'future', 'chromium-mac-future')
-
-        self.assert_name('chromium-mac', 'lion', 'chromium-mac-lion')
-        self.assert_name('chromium-mac-future', 'snowleopard', 'chromium-mac-future')
-        self.assert_name('chromium-mac-future', 'lion', 'chromium-mac-future')
-        self.assert_name('chromium-mac-future', 'mountainlion', 'chromium-mac-future')
-
-        self.assertRaises(AssertionError, self.assert_name, None, 'tiger', 'should-raise-assertion-so-this-value-does-not-matter')
-
-    def test_baseline_path(self):
-        port = self.make_port(port_name='chromium-mac-snowleopard')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-snowleopard'))
-
-        port = self.make_port(port_name='chromium-mac-lion')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-lion'))
-
-        port = self.make_port(port_name='chromium-mac-mountainlion')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
-
-        port = self.make_port(port_name='chromium-mac-future')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
-
-    def test_operating_system(self):
-        self.assertEqual('mac', self.make_port().operating_system())
-
-    def test_build_path(self):
-        # Test that optional paths are used regardless of whether they exist.
-        options = MockOptions(configuration='Release', build_directory='/foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
-        # Test that optional relative paths are returned unmodified.
-        options = MockOptions(configuration='Release', build_directory='foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
-        # Test that we prefer the legacy dir over the new dir.
-        options = MockOptions(configuration='Release', build_directory=None)
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/xcodebuild/Release', '/mock-checkout/Source/WebKit/chromium/out/Release'], '/mock-checkout/Source/WebKit/chromium/xcodebuild/Release')
-
-    def test_build_path_timestamps(self):
-        options = MockOptions(configuration='Release', build_directory=None)
-        port = self.make_port(options=options)
-        port.host.filesystem.maybe_make_directory('/mock-checkout/out/Release')
-        port.host.filesystem.maybe_make_directory('/mock-checkout/xcodebuild/Release')
-        # Check with 'out' being newer.
-        port.host.filesystem.mtime = lambda f: 5 if '/out/' in f else 4
-        self.assertEqual(port._build_path(), '/mock-checkout/out/Release')
-        # Check with 'xcodebuild' being newer.
-        port.host.filesystem.mtime = lambda f: 5 if '/xcodebuild/' in f else 4
-        self.assertEqual(port._build_path(), '/mock-checkout/xcodebuild/Release')
-
-    def test_driver_name_option(self):
-        self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree'))
-        self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
-
-    def test_path_to_image_diff(self):
-        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py
deleted file mode 100644 (file)
index f151ced..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest2 as unittest
-
-from webkitpy.common.system import logtesting
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.tool.mocktool import MockOptions
-
-import chromium_android
-import chromium_linux
-import chromium_mac
-import chromium_win
-
-from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port import port_testcase
-
-
-class ChromiumPortTestCase(port_testcase.PortTestCase):
-
-    def test_check_build(self):
-        port = self.make_port()
-        port.check_build(needs_http=True)
-
-    def test_default_max_locked_shards(self):
-        port = self.make_port()
-        port.default_child_processes = lambda: 16
-        self.assertEqual(port.default_max_locked_shards(), 4)
-        port.default_child_processes = lambda: 2
-        self.assertEqual(port.default_max_locked_shards(), 1)
-
-    def test_default_timeout_ms(self):
-        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
-        self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
-
-    def test_default_pixel_tests(self):
-        self.assertEqual(self.make_port().default_pixel_tests(), True)
-
-    def test_missing_symbol_to_skipped_tests(self):
-        # Test that we get the chromium skips and not the webkit default skips
-        port = self.make_port()
-        skip_dict = port._missing_symbol_to_skipped_tests()
-        self.assertTrue('ff_mp3_decoder' in skip_dict)
-        self.assertFalse('WebGLShader' in skip_dict)
-
-    def test_all_test_configurations(self):
-        """Validate the complete set of configurations this port knows about."""
-        port = self.make_port()
-        self.assertEqual(set(port.all_test_configurations()), set([
-            TestConfiguration('icecreamsandwich', 'x86', 'debug'),
-            TestConfiguration('icecreamsandwich', 'x86', 'release'),
-            TestConfiguration('snowleopard', 'x86', 'debug'),
-            TestConfiguration('snowleopard', 'x86', 'release'),
-            TestConfiguration('lion', 'x86', 'debug'),
-            TestConfiguration('lion', 'x86', 'release'),
-            TestConfiguration('mountainlion', 'x86', 'debug'),
-            TestConfiguration('mountainlion', 'x86', 'release'),
-            TestConfiguration('xp', 'x86', 'debug'),
-            TestConfiguration('xp', 'x86', 'release'),
-            TestConfiguration('win7', 'x86', 'debug'),
-            TestConfiguration('win7', 'x86', 'release'),
-            TestConfiguration('lucid', 'x86', 'debug'),
-            TestConfiguration('lucid', 'x86', 'release'),
-            TestConfiguration('lucid', 'x86_64', 'debug'),
-            TestConfiguration('lucid', 'x86_64', 'release'),
-        ]))
-
-    class TestMacPort(chromium_mac.ChromiumMacPort):
-        def __init__(self, options=None):
-            options = options or MockOptions()
-            chromium_mac.ChromiumMacPort.__init__(self, MockSystemHost(os_name='mac', os_version='leopard'), 'chromium-mac-leopard', options=options)
-
-        def default_configuration(self):
-            self.default_configuration_called = True
-            return 'default'
-
-    class TestAndroidPort(chromium_android.ChromiumAndroidPort):
-        def __init__(self, options=None):
-            options = options or MockOptions()
-            chromium_android.ChromiumAndroidPort.__init__(self, MockSystemHost(os_name='android', os_version='icecreamsandwich'), 'chromium-android', options=options)
-
-        def default_configuration(self):
-            self.default_configuration_called = True
-            return 'default'
-
-    class TestLinuxPort(chromium_linux.ChromiumLinuxPort):
-        def __init__(self, options=None):
-            options = options or MockOptions()
-            chromium_linux.ChromiumLinuxPort.__init__(self, MockSystemHost(os_name='linux', os_version='lucid'), 'chromium-linux-x86', options=options)
-
-        def default_configuration(self):
-            self.default_configuration_called = True
-            return 'default'
-
-    class TestWinPort(chromium_win.ChromiumWinPort):
-        def __init__(self, options=None):
-            options = options or MockOptions()
-            chromium_win.ChromiumWinPort.__init__(self, MockSystemHost(os_name='win', os_version='xp'), 'chromium-win-xp', options=options)
-
-        def default_configuration(self):
-            self.default_configuration_called = True
-            return 'default'
-
-    def test_default_configuration(self):
-        mock_options = MockOptions()
-        port = ChromiumPortTestCase.TestLinuxPort(options=mock_options)
-        self.assertEqual(mock_options.configuration, 'default')  # pylint: disable=E1101
-        self.assertTrue(port.default_configuration_called)
-
-        mock_options = MockOptions(configuration=None)
-        port = ChromiumPortTestCase.TestLinuxPort(mock_options)
-        self.assertEqual(mock_options.configuration, 'default')  # pylint: disable=E1101
-        self.assertTrue(port.default_configuration_called)
-
-    def test_diff_image(self):
-        class TestPort(ChromiumPortTestCase.TestLinuxPort):
-            def _path_to_image_diff(self):
-                return "/path/to/image_diff"
-
-        port = ChromiumPortTestCase.TestLinuxPort()
-        mock_image_diff = "MOCK Image Diff"
-
-        def mock_run_command(args):
-            port._filesystem.write_binary_file(args[4], mock_image_diff)
-            return 1
-
-        # Images are different.
-        port._executive = MockExecutive2(run_command_fn=mock_run_command)
-        self.assertEqual(mock_image_diff, port.diff_image("EXPECTED", "ACTUAL")[0])
-
-        # Images are the same.
-        port._executive = MockExecutive2(exit_code=0)
-        self.assertEqual(None, port.diff_image("EXPECTED", "ACTUAL")[0])
-
-        # There was some error running image_diff.
-        port._executive = MockExecutive2(exit_code=2)
-        exception_raised = False
-        try:
-            port.diff_image("EXPECTED", "ACTUAL")
-        except ValueError, e:
-            exception_raised = True
-        self.assertFalse(exception_raised)
-
-    def test_diff_image_crashed(self):
-        port = ChromiumPortTestCase.TestLinuxPort()
-        port._executive = MockExecutive2(exit_code=2)
-        self.assertEqual(port.diff_image("EXPECTED", "ACTUAL"), (None, 0, 'image diff returned an exit code of 2'))
-
-    def test_expectations_files(self):
-        port = self.make_port()
-        port.port_name = 'chromium'
-
-        generic_path = port.path_to_generic_test_expectations_file()
-        expectations_path = port.path_to_test_expectations_file()
-        chromium_overrides_path = port.path_from_chromium_base(
-            'webkit', 'tools', 'layout_tests', 'test_expectations.txt')
-        skia_overrides_path = port.path_from_chromium_base(
-            'skia', 'skia_test_expectations.txt')
-
-        port._filesystem.write_text_file(skia_overrides_path, 'dummay text')
-
-        port._options.builder_name = 'DUMMY_BUILDER_NAME'
-        self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path, chromium_overrides_path])
-
-        port._options.builder_name = 'builder (deps)'
-        self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path, chromium_overrides_path])
-
-        # A builder which does NOT observe the Chromium test_expectations,
-        # but still observes the Skia test_expectations...
-        port._options.builder_name = 'builder'
-        self.assertEqual(port.expectations_files(), [generic_path, expectations_path, skia_overrides_path])
-
-    def test_expectations_ordering(self):
-        # since we don't implement self.port_name in ChromiumPort.
-        pass
-
-
-class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
-    def test_check_sys_deps(self):
-        port = ChromiumPortTestCase.TestLinuxPort()
-
-        # Success
-        port._executive = MockExecutive2(exit_code=0)
-        self.assertTrue(port.check_sys_deps(needs_http=False))
-
-        # Failure
-        port._executive = MockExecutive2(exit_code=1,
-            output='testing output failure')
-        self.assertFalse(port.check_sys_deps(needs_http=False))
-        self.assertLog([
-            'ERROR: System dependencies check failed.\n',
-            'ERROR: To override, invoke with --nocheck-sys-deps\n',
-            'ERROR: \n',
-            'ERROR: testing output failure\n'])
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
deleted file mode 100644 (file)
index c6c50df..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import StringIO
-import time
-
-from webkitpy.common.system import logtesting
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockOptions
-
-import chromium
-import chromium_mac
-
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port.driver import DriverInput
-
-
-class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
-
-    # FIXME: put this someplace more useful
-    def test_check_sys_deps(self):
-        port = chromium_port_testcase.ChromiumPortTestCase.TestLinuxPort()
-
-        # Success
-        port._executive = MockExecutive2(exit_code=0)
-        self.assertTrue(port.check_sys_deps(needs_http=False))
-
-        # Failure
-        port._executive = MockExecutive2(exit_code=1,
-            output='testing output failure')
-        self.assertFalse(port.check_sys_deps(needs_http=False))
-        self.assertLog([
-            'ERROR: System dependencies check failed.\n',
-            'ERROR: To override, invoke with --nocheck-sys-deps\n',
-            'ERROR: \n',
-            'ERROR: testing output failure\n'])
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
deleted file mode 100644 (file)
index 31e10c5..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Chromium Win implementation of the Port interface."""
-
-import os
-import logging
-
-import chromium
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumWinPort(chromium.ChromiumPort):
-    port_name = 'chromium-win'
-
-    # FIXME: Figure out how to unify this with base.TestConfiguration.all_systems()?
-    SUPPORTED_VERSIONS = ('xp', 'win7')
-
-    FALLBACK_PATHS = {
-        'xp': [
-            'chromium-win-xp',
-            'chromium-win',
-            'chromium',
-        ],
-        'win7': [
-            'chromium-win',
-            'chromium',
-        ],
-    }
-
-    DEFAULT_BUILD_DIRECTORIES = ('build', 'out')
-
-    @classmethod
-    def determine_full_port_name(cls, host, options, port_name):
-        if port_name.endswith('-win'):
-            assert host.platform.is_win()
-            # We don't maintain separate baselines for vista, so we pretend it is win7.
-            if host.platform.os_version in ('vista', '7sp0', '7sp1', 'future'):
-                version = 'win7'
-            else:
-                version = host.platform.os_version
-            port_name = port_name + '-' + version
-        return port_name
-
-    def __init__(self, host, port_name, **kwargs):
-        chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
-        self._version = port_name[port_name.index('chromium-win-') + len('chromium-win-'):]
-        assert self._version in self.SUPPORTED_VERSIONS, "%s is not in %s" % (self._version, self.SUPPORTED_VERSIONS)
-
-    def setup_environ_for_server(self, server_name=None):
-        env = chromium.ChromiumPort.setup_environ_for_server(self, server_name)
-
-        # FIXME: lighttpd depends on some environment variable we're not whitelisting.
-        # We should add the variable to an explicit whitelist in base.Port.
-        # FIXME: This is a temporary hack to get the cr-win bot online until
-        # someone from the cr-win port can take a look.
-        for key, value in os.environ.items():
-            if key not in env:
-                env[key] = value
-
-        # Put the cygwin directory first in the path to find cygwin1.dll.
-        env["PATH"] = "%s;%s" % (self.path_from_chromium_base("third_party", "cygwin", "bin"), env["PATH"])
-        # Configure the cygwin directory so that pywebsocket finds proper
-        # python executable to run cgi program.
-        env["CYGWIN_PATH"] = self.path_from_chromium_base("third_party", "cygwin", "bin")
-        if self.get_option('register_cygwin'):
-            setup_mount = self.path_from_chromium_base("third_party", "cygwin", "setup_mount.bat")
-            self._executive.run_command([setup_mount])  # Paths are all absolute, so this does not require a cwd.
-        return env
-
-    def _modules_to_search_for_symbols(self):
-        # FIXME: we should return the path to the ffmpeg equivalents to detect if we have the mp3 and aac codecs installed.
-        # See https://bugs.webkit.org/show_bug.cgi?id=89706.
-        return []
-
-    def check_build(self, needs_http):
-        result = chromium.ChromiumPort.check_build(self, needs_http)
-        if not result:
-            _log.error('For complete Windows build requirements, please see:')
-            _log.error('')
-            _log.error('    http://dev.chromium.org/developers/how-tos/build-instructions-windows')
-        return result
-
-    def operating_system(self):
-        return 'win'
-
-    def relative_test_filename(self, filename):
-        path = filename[len(self.layout_tests_dir()) + 1:]
-        return path.replace('\\', '/')
-
-    #
-    # PROTECTED ROUTINES
-    #
-
-    def _uses_apache(self):
-        return False
-
-    def _lighttpd_path(self, *comps):
-        return self.path_from_chromium_base('third_party', 'lighttpd', 'win', *comps)
-
-    def _path_to_apache(self):
-        return self.path_from_chromium_base('third_party', 'cygwin', 'usr', 'sbin', 'httpd')
-
-    def _path_to_apache_config_file(self):
-        return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'cygwin-httpd.conf')
-
-    def _path_to_lighttpd(self):
-        return self._lighttpd_path('LightTPD.exe')
-
-    def _path_to_lighttpd_modules(self):
-        return self._lighttpd_path('lib')
-
-    def _path_to_lighttpd_php(self):
-        return self._lighttpd_path('php5', 'php-cgi.exe')
-
-    def _path_to_driver(self, configuration=None):
-        binary_name = '%s.exe' % self.driver_name()
-        return self._build_path_with_configuration(configuration, binary_name)
-
-    def _path_to_helper(self):
-        binary_name = 'LayoutTestHelper.exe'
-        return self._build_path(binary_name)
-
-    def _path_to_image_diff(self):
-        binary_name = 'ImageDiff.exe'
-        return self._build_path(binary_name)
-
-    def _path_to_wdiff(self):
-        return self.path_from_chromium_base('third_party', 'cygwin', 'bin', 'wdiff.exe')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
deleted file mode 100644 (file)
index 2c51598..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os
-import unittest2 as unittest
-
-from webkitpy.common.system import outputcapture
-from webkitpy.common.system.executive_mock import MockExecutive
-from webkitpy.common.system.filesystem_mock import MockFileSystem
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port import chromium_win
-from webkitpy.tool.mocktool import MockOptions
-
-
-class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
-    port_name = 'chromium-win'
-    port_maker = chromium_win.ChromiumWinPort
-    os_name = 'win'
-    os_version = 'xp'
-
-    def test_uses_apache(self):
-        self.assertFalse(self.make_port()._uses_apache())
-
-    def test_setup_environ_for_server(self):
-        port = self.make_port()
-        port._executive = MockExecutive(should_log=True)
-        output = outputcapture.OutputCapture()
-        # FIXME: This test should not use the real os.environ
-        orig_environ = os.environ.copy()
-        env = output.assert_outputs(self, port.setup_environ_for_server)
-        self.assertEqual(orig_environ["PATH"], os.environ["PATH"])
-        self.assertNotEqual(env["PATH"], os.environ["PATH"])
-
-    def test_setup_environ_for_server_cygpath(self):
-        port = self.make_port()
-        env = port.setup_environ_for_server(port.driver_name())
-        self.assertEqual(env['CYGWIN_PATH'], '/mock-checkout/Source/WebKit/chromium/third_party/cygwin/bin')
-
-    def test_setup_environ_for_server_register_cygwin(self):
-        port = self.make_port(options=MockOptions(register_cygwin=True, results_directory='/'))
-        port._executive = MockExecutive(should_log=True)
-        expected_logs = "MOCK run_command: ['/mock-checkout/Source/WebKit/chromium/third_party/cygwin/setup_mount.bat'], cwd=None\n"
-        output = outputcapture.OutputCapture()
-        output.assert_outputs(self, port.setup_environ_for_server, expected_logs=expected_logs)
-
-    def assert_name(self, port_name, os_version_string, expected):
-        port = self.make_port(port_name=port_name, os_version=os_version_string)
-        self.assertEqual(expected, port.name())
-
-    def test_versions(self):
-        port = self.make_port()
-        self.assertIn(port.name(), ('chromium-win-xp', 'chromium-win-win7'))
-
-        self.assert_name(None, 'xp', 'chromium-win-xp')
-        self.assert_name('chromium-win', 'xp', 'chromium-win-xp')
-        self.assert_name('chromium-win-xp', 'xp', 'chromium-win-xp')
-        self.assert_name('chromium-win-xp', '7sp0', 'chromium-win-xp')
-
-        self.assert_name(None, '7sp0', 'chromium-win-win7')
-        self.assert_name(None, 'vista', 'chromium-win-win7')
-        self.assert_name('chromium-win', '7sp0', 'chromium-win-win7')
-        self.assert_name('chromium-win-win7', 'xp', 'chromium-win-win7')
-        self.assert_name('chromium-win-win7', '7sp0', 'chromium-win-win7')
-        self.assert_name('chromium-win-win7', 'vista', 'chromium-win-win7')
-
-        self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'chromium-win-xp')
-
-    def test_baseline_path(self):
-        port = self.make_port(port_name='chromium-win-xp')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win-xp'))
-
-        port = self.make_port(port_name='chromium-win-win7')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win'))
-
-    def test_build_path(self):
-        # Test that optional paths are used regardless of whether they exist.
-        options = MockOptions(configuration='Release', build_directory='/foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
-        # Test that optional relative paths are returned unmodified.
-        options = MockOptions(configuration='Release', build_directory='foo')
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
-        # Test that we prefer the legacy dir over the new dir.
-        options = MockOptions(configuration='Release', build_directory=None)
-        self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/build/Release', '/mock-checkout/Source/WebKit/chromium/out'], '/mock-checkout/Source/WebKit/chromium/build/Release')
-
-    def test_build_path_timestamps(self):
-        options = MockOptions(configuration='Release', build_directory=None)
-        port = self.make_port(options=options)
-        port.host.filesystem.maybe_make_directory('/mock-checkout/out/Release')
-        port.host.filesystem.maybe_make_directory('/mock-checkout/build/Release')
-        # Check with 'out' being newer.
-        port.host.filesystem.mtime = lambda f: 5 if '/out/' in f else 4
-        self.assertEqual(port._build_path(), '/mock-checkout/out/Release')
-        # Check with 'build' being newer.
-        port.host.filesystem.mtime = lambda f: 5 if '/build/' in f else 4
-        self.assertEqual(port._build_path(), '/mock-checkout/build/Release')
-
-    def test_operating_system(self):
-        self.assertEqual('win', self.make_port().operating_system())
-
-    def test_driver_name_option(self):
-        self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree.exe'))
-        self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver.exe'))
-
-    def test_path_to_image_diff(self):
-        self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff.exe')
index 902ee22..fdca539 100644 (file)
@@ -39,12 +39,6 @@ def platform_options(use_globs=False):
     return [
         optparse.make_option('--platform', action='store',
             help=('Glob-style list of platform/ports to use (e.g., "mac*")' if use_globs else 'Platform to use (e.g., "mac-lion")')),
-        optparse.make_option('--chromium', action='store_const', dest='platform',
-            const=('chromium*' if use_globs else 'chromium'),
-            help=('Alias for --platform=chromium*' if use_globs else 'Alias for --platform=chromium')),
-        optparse.make_option('--chromium-android', action='store_const', dest='platform',
-            const=('chromium-android*' if use_globs else 'chromium-android'),
-            help=('Alias for --platform=chromium-android*' if use_globs else 'Alias for --platform=chromium')),
         optparse.make_option('--efl', action='store_const', dest='platform',
             const=('efl*' if use_globs else 'efl'),
             help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')),
@@ -80,10 +74,6 @@ def _builder_options(builder_name):
 
 class PortFactory(object):
     PORT_CLASSES = (
-        'chromium_android.ChromiumAndroidPort',
-        'chromium_linux.ChromiumLinuxPort',
-        'chromium_mac.ChromiumMacPort',
-        'chromium_win.ChromiumWinPort',
         'efl.EflPort',
         'gtk.GtkPort',
         'mac.MacPort',
index 363b7b9..0642f3a 100644 (file)
@@ -31,10 +31,6 @@ import unittest2 as unittest
 from webkitpy.tool.mocktool import MockOptions
 from webkitpy.common.system.systemhost_mock import MockSystemHost
 
-from webkitpy.layout_tests.port import chromium_android
-from webkitpy.layout_tests.port import chromium_linux
-from webkitpy.layout_tests.port import chromium_mac
-from webkitpy.layout_tests.port import chromium_win
 from webkitpy.layout_tests.port import factory
 from webkitpy.layout_tests.port import gtk
 from webkitpy.layout_tests.port import mac
@@ -75,29 +71,6 @@ class FactoryTest(unittest.TestCase):
     def test_qt(self):
         self.assert_port(port_name='qt', cls=qt.QtPort)
 
-    def test_chromium_mac(self):
-        self.assert_port(port_name='chromium-mac', os_name='mac', os_version='snowleopard',
-                         cls=chromium_mac.ChromiumMacPort)
-        self.assert_port(port_name='chromium', os_name='mac', os_version='lion',
-                         cls=chromium_mac.ChromiumMacPort)
-
-    def test_chromium_linux(self):
-        self.assert_port(port_name='chromium-linux', cls=chromium_linux.ChromiumLinuxPort)
-        self.assert_port(port_name='chromium', os_name='linux', os_version='lucid',
-                         cls=chromium_linux.ChromiumLinuxPort)
-
-    def test_chromium_android(self):
-        self.assert_port(port_name='chromium-android', cls=chromium_android.ChromiumAndroidPort)
-        # NOTE: We can't check for port_name=chromium here, as this will append the host's
-        # operating system, whereas host!=target for Android.
-
-    def test_chromium_win(self):
-        self.assert_port(port_name='chromium-win-xp', cls=chromium_win.ChromiumWinPort)
-        self.assert_port(port_name='chromium-win', os_name='win', os_version='xp',
-                         cls=chromium_win.ChromiumWinPort)
-        self.assert_port(port_name='chromium', os_name='win', os_version='xp',
-                         cls=chromium_win.ChromiumWinPort)
-
     def test_unknown_specified(self):
         self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost()).get, port_name='unknown')
 
@@ -105,5 +78,5 @@ class FactoryTest(unittest.TestCase):
         self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost(os_name='vms')).get)
 
     def test_get_from_builder_name(self):
-        self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.7').name(),
-                          'chromium-mac-lion')
+        self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('Apple Lion Release WK1 (Tests)').name(),
+                          'mac-lion')
index ee9f86f..7567b35 100644 (file)
@@ -820,9 +820,10 @@ class RunTest(unittest.TestCase, StreamTestingMixin):
     def test_build_check(self):
         # By using a port_name for a different platform than the one we're running on, the build check should always fail.
         if sys.platform == 'darwin':
-            port_name = 'chromium-linux-x86'
+            port_name = 'qt-linux'
         else:
-            port_name = 'chromium-mac-lion'
+            port_name = 'mac-lion'
+        port_name = 'mac-lion'
         out = StringIO.StringIO()
         err = StringIO.StringIO()
         self.assertEqual(run_webkit_tests.main(['--platform', port_name, 'fast/harness/results.html'], out, err), -1)
index 43ef836..e3c0c0b 100644 (file)
@@ -74,8 +74,6 @@ class TestExpectationsTestCase(unittest.TestCase):
 
     def test_determine_port_from_expectations_path(self):
         self._expect_port_for_expectations_path(None, '/')
-        self._expect_port_for_expectations_path(None, 'LayoutTests/chromium-mac/TestExpectations')
-        self._expect_port_for_expectations_path('chromium', 'LayoutTests/platform/chromium/TestExpectations')
         self._expect_port_for_expectations_path(None, '/mock-checkout/LayoutTests/platform/win/TestExpectations')
         self._expect_port_for_expectations_path('win', 'LayoutTests/platform/win/TestExpectations')
         self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl/TestExpectations')
index b6e408d..e428066 100644 (file)
@@ -454,16 +454,12 @@ class Rebaseline(AbstractParallelRebaselineCommand):
             ])
 
     def _builders_to_pull_from(self):
-        chromium_buildbot_builder_names = []
         webkit_buildbot_builder_names = []
         for name in builders.all_builder_names():
-            if self._tool.port_factory.get_from_builder_name(name).is_chromium():
-                chromium_buildbot_builder_names.append(name)
-            else:
-                webkit_buildbot_builder_names.append(name)
+            webkit_buildbot_builder_names.append(name)
 
-        titles = ["build.webkit.org bots", "build.chromium.org bots"]
-        lists = [webkit_buildbot_builder_names, chromium_buildbot_builder_names]
+        titles = ["build.webkit.org bots"]
+        lists = [webkit_buildbot_builder_names]
 
         chosen_names = self._tool.user.prompt_with_multiple_lists("Which builder to pull results from:", titles, lists, can_choose_multiple=True)
         return [self._builder_with_name(name) for name in chosen_names]
index b93e1a5..43a8786 100644 (file)
@@ -39,7 +39,7 @@ from webkitpy.tool.mocktool import MockTool, MockOptions
 
 class _BaseTestCase(unittest.TestCase):
     MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True'
-    WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.7/results/layout-test-results'
+    WEB_PREFIX = 'http://example.com/f/builders/Apple Lion Release WK1 (Tests)/results/layout-test-results'
 
     command_constructor = None
 
@@ -47,7 +47,7 @@ class _BaseTestCase(unittest.TestCase):
         self.tool = MockTool()
         self.command = self.command_constructor()  # lint warns that command_constructor might not be set, but this is intentional; pylint: disable=E1102
         self.command.bind_to_tool(self.tool)
-        self.lion_port = self.tool.port_factory.get_from_builder_name("WebKit Mac10.7")
+        self.lion_port = self.tool.port_factory.get_from_builder_name("Apple Lion Release WK1 (Tests)")
         self.lion_expectations_path = self.lion_port.path_to_test_expectations_file()
 
         # FIXME: we should override builders._exact_matches here to point to a set
@@ -78,7 +78,7 @@ class TestRebaselineTest(_BaseTestCase):
 
     def setUp(self):
         super(TestRebaselineTest, self).setUp()
-        self.options = MockOptions(builder="WebKit Mac10.7", test="userscripts/another-test.html", suffixes="txt",
+        self.options = MockOptions(builder="Apple Lion Release WK1 (Tests)", test="userscripts/another-test.html", suffixes="txt",
                                    move_overwritten_baselines_to=None, results_directory=None)
 
     def test_baseline_directory(self):
@@ -87,12 +87,12 @@ class TestRebaselineTest(_BaseTestCase):
         self.assertMultiLineEqual(command._baseline_directory("Apple Win 7 Release (Tests)"), "/mock-checkout/LayoutTests/platform/win")
         self.assertMultiLineEqual(command._baseline_directory("Apple Lion Release WK1 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-lion")
         self.assertMultiLineEqual(command._baseline_directory("Apple Lion Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-wk2")
+        self.assertMultiLineEqual(command._baseline_directory("Apple MountainLion Release WK1 (Tests)"), "/mock-checkout/LayoutTests/platform/mac")
+        self.assertMultiLineEqual(command._baseline_directory("Apple MountainLion Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/mac")
         self.assertMultiLineEqual(command._baseline_directory("GTK Linux 64-bit Debug"), "/mock-checkout/LayoutTests/platform/gtk-wk1")
         self.assertMultiLineEqual(command._baseline_directory("GTK Linux 64-bit Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/gtk-wk2")
         self.assertMultiLineEqual(command._baseline_directory("EFL Linux 64-bit Release WK2"), "/mock-checkout/LayoutTests/platform/efl-wk2")
         self.assertMultiLineEqual(command._baseline_directory("Qt Linux Release"), "/mock-checkout/LayoutTests/platform/qt")
-        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.7"), "/mock-checkout/LayoutTests/platform/chromium-mac-lion")
-        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.6"), "/mock-checkout/LayoutTests/platform/chromium-mac-snowleopard")
 
     def test_rebaseline_updates_expectations_file_noop(self):
         self._zero_out_test_expectations()
@@ -127,11 +127,10 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
              self.WEB_PREFIX + '/userscripts/another-test-actual.wav',
              self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
         new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ MountainLion SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
 
     def test_rebaseline_does_not_include_overrides(self):
         self._write(self.lion_expectations_path, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
-        self._write(self.lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), "Bug(y) [ Mac ] other-test.html [ Failure ]\n")
         self._write("userscripts/another-test.html", "Dummy test contents")
 
         self.options.suffixes = 'png,wav,txt'
@@ -143,10 +142,10 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
              self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
 
         new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ MountainLion SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
 
     def test_rebaseline_test(self):
-        self.command._rebaseline_test("WebKit Linux", "userscripts/another-test.html", None, "txt", self.WEB_PREFIX)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", None, "txt", self.WEB_PREFIX)
         self.assertItemsEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
 
     def test_rebaseline_test_with_results_directory(self):
@@ -160,41 +159,41 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
         self.command._scm_changes = {'add': [], 'delete': []}
         self.tool._scm.exists = lambda x: False
 
-        self.command._rebaseline_test("WebKit Linux", "userscripts/another-test.html", None, "txt", None)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", None, "txt", None)
 
-        self.assertDictEqual(self.command._scm_changes, {'add': ['/mock-checkout/LayoutTests/platform/chromium-linux/userscripts/another-test-expected.txt'], 'delete': []})
+        self.assertDictEqual(self.command._scm_changes, {'add': ['/mock-checkout/LayoutTests/platform/mac-lion/userscripts/another-test-expected.txt'], 'delete': []})
 
     def test_rebaseline_and_copy_test(self):
         self._write("userscripts/another-test-expected.txt", "generic result")
 
-        self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
 
-        self.assertMultiLineEqual(self._read('platform/chromium-mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
-        self.assertMultiLineEqual(self._read('platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt'), 'generic result')
+        self.assertMultiLineEqual(self._read('platform/mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
+        self.assertMultiLineEqual(self._read('platform/mac-wk2/userscripts/another-test-expected.txt'), 'generic result')
 
     def test_rebaseline_and_copy_test_no_existing_result(self):
-        self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
 
-        self.assertMultiLineEqual(self._read('platform/chromium-mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
-        self.assertFalse(self.tool.filesystem.exists(self._expand('platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt')))
+        self.assertMultiLineEqual(self._read('platform/mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
+        self.assertFalse(self.tool.filesystem.exists(self._expand('platform/mac-lion-wk2/userscripts/another-test-expected.txt')))
 
     def test_rebaseline_and_copy_test_with_lion_result(self):
-        self._write("platform/chromium-mac-lion/userscripts/another-test-expected.txt", "original lion result")
+        self._write("platform/mac-lion/userscripts/another-test-expected.txt", "original lion result")
 
-        self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", self.WEB_PREFIX)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", self.WEB_PREFIX)
 
         self.assertItemsEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
-        self.assertMultiLineEqual(self._read("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt"), "original lion result")
-        self.assertMultiLineEqual(self._read("platform/chromium-mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
+        self.assertMultiLineEqual(self._read("platform/mac-wk2/userscripts/another-test-expected.txt"), "original lion result")
+        self.assertMultiLineEqual(self._read("platform/mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
 
     def test_rebaseline_and_copy_no_overwrite_test(self):
-        self._write("platform/chromium-mac-lion/userscripts/another-test-expected.txt", "original lion result")
-        self._write("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt", "original snowleopard result")
+        self._write("platform/mac-lion/userscripts/another-test-expected.txt", "original lion result")
+        self._write("platform/mac-lion-wk2/userscripts/another-test-expected.txt", "original lion wk2 result")
 
-        self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+        self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
 
-        self.assertMultiLineEqual(self._read("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt"), "original snowleopard result")
-        self.assertMultiLineEqual(self._read("platform/chromium-mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
+        self.assertMultiLineEqual(self._read("platform/mac-lion-wk2/userscripts/another-test-expected.txt"), "original lion wk2 result")
+        self.assertMultiLineEqual(self._read("platform/mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
 
     def test_rebaseline_test_internal_with_move_overwritten_baselines_to(self):
         self.tool.executive = MockExecutive2()
@@ -337,7 +336,7 @@ class TestRebaselineExpectations(_BaseTestCase):
         # FIXME: change this to use the test- ports.
         calls = filter(lambda x: x != ['qmake', '-v'], self.tool.executive.calls)
         self.assertEqual(len(calls), 1)
-        self.assertEqual(len(calls[0]), 36)
+        self.assertEqual(len(calls[0]), 22)
 
     def test_rebaseline_expectations_noop(self):
         self._zero_out_test_expectations()