WebKit Bugzilla
Attachment 146976 Details for
Bug 88824
: nrwt: remove the 'google-chrome' port code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-88824-20120611173143.patch (text/plain), 17.58 KB, created by
Dirk Pranke
on 2012-06-11 17:31:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dirk Pranke
Created:
2012-06-11 17:31:44 PDT
Size:
17.58 KB
patch
obsolete
>Subversion Revision: 119997 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 6b3f2a776c1e8b08b84747996085b38439d968f8..b6a5300669ef7a6b7b0393114c050bec4b11a70f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,28 @@ >+2012-06-11 Dirk Pranke <dpranke@chromium.org> >+ >+ nrwt: remove the 'google-chrome' port code >+ https://bugs.webkit.org/show_bug.cgi?id=88824 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ NRWT now supports passing additional baseline directories >+ and expectations files on the command line, so there's no need >+ to support the concept of a 'google-chrome' port directly. >+ >+ * Scripts/webkitpy/layout_tests/port/base.py: >+ (Port.path_to_test_expectations_file): >+ * Scripts/webkitpy/layout_tests/port/builders.py: >+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py: >+ (ChromiumMacPort.__init__): >+ * Scripts/webkitpy/layout_tests/port/chromium_win.py: >+ (ChromiumWinPort.__init__): >+ * Scripts/webkitpy/layout_tests/port/factory.py: >+ (PortFactory): >+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py: >+ (FactoryTest.test_win): >+ * Scripts/webkitpy/layout_tests/port/google_chrome.py: Removed. >+ * Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py: Removed. >+ > 2012-06-11 David Dorwin <ddorwin@chromium.org> > > [chromium] Provide access to the WebPlugin created by the helper plugin widget >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py >index d0ef4705de1bdae6a979d4f73665f2a16e24d909..ba5e093ce3e8e1d75583465d0f97605da97ae78e 100755 >--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py >@@ -691,7 +691,7 @@ class Port(object): > > # test_expectations are always in mac/ not mac-leopard/ by convention, hence we use port_name instead of name(). > port_name = self.port_name >- if port_name.startswith('chromium') or port_name.startswith('google-chrome'): >+ if port_name.startswith('chromium'): > port_name = 'chromium' > > baseline_path = self._webkit_baseline_path(port_name) >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/Tools/Scripts/webkitpy/layout_tests/port/builders.py >index 1249bb543f46ce6d17be81f9bec05c10e74bb036..43a7ca1a2cb9e1a3fb4e228b8c270341f60cc544 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/builders.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/builders.py >@@ -79,8 +79,6 @@ _fuzzy_matches = { > > > _ports_without_builders = [ >- "google-chrome-linux32", >- "google-chrome-linux64", > "qt-mac", > "qt-win", > "qt-wk2", >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py >index b3b7b1415edab128272ae9e2116ce38c956cf311..b03fe6c16b3fbebce154f97d2196fea153393ead 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py >@@ -78,10 +78,7 @@ class ChromiumMacPort(chromium.ChromiumPort): > > def __init__(self, host, port_name, **kwargs): > chromium.ChromiumPort.__init__(self, host, port_name, **kwargs) >- >- # We're a little generic here because this code is reused by the >- # 'google-chrome' port as well as the 'mock-' and 'dryrun-' ports. >- self._version = port_name[port_name.index('-mac-') + len('-mac-'):] >+ self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):] > assert self._version in self.SUPPORTED_OS_VERSIONS > > def baseline_search_path(self): >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py >index b76f7ee68e977aa8213b88ff0c33b43900890f3f..4200ea144672eb2c93f16c7353853c74521354f8 100755 >--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py >@@ -81,10 +81,7 @@ class ChromiumWinPort(chromium.ChromiumPort): > > def __init__(self, host, port_name, **kwargs): > chromium.ChromiumPort.__init__(self, host, port_name, **kwargs) >- >- # We're a little generic here because this code is reused by the >- # 'google-chrome' port as well as the 'mock-' and 'dryrun-' ports. >- self._version = port_name[port_name.index('-win-') + len('-win-'):] >+ 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): >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/layout_tests/port/factory.py >index 9f5df7c7e49b0c2fbe34000b850c4c96352c0a7b..6713678fee01e353dc4466fdeda1a07555a01467 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory.py >@@ -69,10 +69,6 @@ class PortFactory(object): > 'chromium_mac.ChromiumMacPort', > 'chromium_win.ChromiumWinPort', > 'efl.EflPort', >- 'google_chrome.GoogleChromeLinux32Port', >- 'google_chrome.GoogleChromeLinux64Port', >- 'google_chrome.GoogleChromeMacPort', >- 'google_chrome.GoogleChromeWinPort', > 'gtk.GtkPort', > 'mac.MacPort', > 'mock_drt.MockDRTPort', >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py >index 9fc20582fa972a4f9ccece0c0d55f5645d7ed54f..9212e13365d9f8faef67557c273c6b1d1a4347b8 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py >@@ -35,7 +35,6 @@ 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 google_chrome > from webkitpy.layout_tests.port import gtk > from webkitpy.layout_tests.port import mac > from webkitpy.layout_tests.port import qt >@@ -69,26 +68,6 @@ class FactoryTest(unittest.TestCase): > self.assert_port(port_name=None, os_name='win', os_version='xp', cls=win.WinPort) > self.assert_port(port_name=None, os_name='win', os_version='xp', options=self.webkit_options, cls=win.WinPort) > >- def test_google_chrome(self): >- self.assert_port(port_name='google-chrome-linux32', >- cls=google_chrome.GoogleChromeLinux32Port) >- self.assert_port(port_name='google-chrome-linux64', os_name='linux', os_version='lucid', >- cls=google_chrome.GoogleChromeLinux64Port) >- self.assert_port(port_name='google-chrome-linux64', >- cls=google_chrome.GoogleChromeLinux64Port) >- self.assert_port(port_name='google-chrome-win-xp', >- cls=google_chrome.GoogleChromeWinPort) >- self.assert_port(port_name='google-chrome-win', os_name='win', os_version='xp', >- cls=google_chrome.GoogleChromeWinPort) >- self.assert_port(port_name='google-chrome-win-xp', os_name='win', os_version='xp', >- cls=google_chrome.GoogleChromeWinPort) >- self.assert_port(port_name='google-chrome-mac', os_name='mac', os_version='leopard', >- cls=google_chrome.GoogleChromeMacPort) >- self.assert_port(port_name='google-chrome-mac-leopard', os_name='mac', os_version='leopard', >- cls=google_chrome.GoogleChromeMacPort) >- self.assert_port(port_name='google-chrome-mac-leopard', >- cls=google_chrome.GoogleChromeMacPort) >- > def test_gtk(self): > self.assert_port(port_name='gtk', cls=gtk.GtkPort) > >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py >deleted file mode 100644 >index 6d5d9276b9e4da732e0ef2830abe128f0d176c51..0000000000000000000000000000000000000000 >--- a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py >+++ /dev/null >@@ -1,120 +0,0 @@ >-#!/usr/bin/env python >-# 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. >- >-# 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 chromium_linux >-import chromium_mac >-import chromium_win >- >- >-def _test_expectations_overrides(port, super): >- # The chrome ports use the regular overrides plus anything in the >- # official test_expectations as well. Hopefully we don't get collisions. >- chromium_overrides = super.test_expectations_overrides(port) >- >- # FIXME: It used to be that AssertionError would get raised by >- # path_from_chromium_base() if we weren't in a Chromium checkout, but >- # this changed in r60427. This should probably be changed back. >- overrides_path = port.path_from_chromium_base('webkit', 'tools', >- 'layout_tests', 'test_expectations_chrome.txt') >- if not port._filesystem.exists(overrides_path): >- return chromium_overrides >- >- chromium_overrides = chromium_overrides or '' >- return chromium_overrides + port._filesystem.read_text_file(overrides_path) >- >- >-class GoogleChromeLinux32Port(chromium_linux.ChromiumLinuxPort): >- port_name = 'google-chrome-linux32' >- >- # FIXME: Make google-chrome-XXX work as a port name. >- @classmethod >- def determine_full_port_name(cls, host, options, port_name): >- return 'chromium-linux-x86' >- >- def baseline_search_path(self): >- paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) >- paths.insert(0, self._webkit_baseline_path('google-chrome-linux32')) >- return paths >- >- def test_expectations_overrides(self): >- return _test_expectations_overrides(self, chromium_linux.ChromiumLinuxPort) >- >- def architecture(self): >- return 'x86' >- >- >-class GoogleChromeLinux64Port(chromium_linux.ChromiumLinuxPort): >- port_name = 'google-chrome-linux64' >- >- # FIXME: Make google-chrome-XXX work as a port name. >- @classmethod >- def determine_full_port_name(cls, host, options, port_name): >- return 'chromium-linux-x86_64' >- >- def baseline_search_path(self): >- paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) >- paths.insert(0, self._webkit_baseline_path('google-chrome-linux64')) >- return paths >- >- def test_expectations_overrides(self): >- return _test_expectations_overrides(self, chromium_linux.ChromiumLinuxPort) >- >- def architecture(self): >- return 'x86_64' >- >- >-class GoogleChromeMacPort(chromium_mac.ChromiumMacPort): >- port_name = 'google-chrome-mac' >- >- # FIXME: Make google-chrome-XXX work as a port name. >- @classmethod >- def determine_full_port_name(cls, host, options, port_name): >- return 'chromium-mac-snowleopard' >- >- def baseline_search_path(self): >- paths = chromium_mac.ChromiumMacPort.baseline_search_path(self) >- paths.insert(0, self._webkit_baseline_path('google-chrome-mac')) >- return paths >- >- def test_expectations_overrides(self): >- return _test_expectations_overrides(self, chromium_mac.ChromiumMacPort) >- >- >-class GoogleChromeWinPort(chromium_win.ChromiumWinPort): >- port_name = 'google-chrome-win' >- >- # FIXME: Make google-chrome-XXX work as a port name. >- @classmethod >- def determine_full_port_name(cls, host, options, port_name): >- return 'chromium-win-win7' >- >- def baseline_search_path(self): >- paths = chromium_win.ChromiumWinPort.baseline_search_path(self) >- paths.insert(0, self._webkit_baseline_path('google-chrome-win')) >- return paths >- >- def test_expectations_overrides(self): >- return _test_expectations_overrides(self, chromium_win.ChromiumWinPort) >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py >deleted file mode 100644 >index c88a3108edc1fc94c5743dad2afbb3dad0214220..0000000000000000000000000000000000000000 >--- a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py >+++ /dev/null >@@ -1,77 +0,0 @@ >-#!/usr/bin/env python >-# 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. >- >-# 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 unittest >- >-from webkitpy.common.system.systemhost_mock import MockSystemHost >-from webkitpy.layout_tests.port.factory import PortFactory >- >- >-class TestGoogleChromePort(unittest.TestCase): >- def _verify_baseline_search_path_startswith(self, port_name, expected_platform_dirs): >- port = PortFactory(MockSystemHost()).get(port_name=port_name) >- actual_platform_dirs = [port._filesystem.basename(path) for path in port.baseline_search_path()] >- self.assertEqual(expected_platform_dirs, actual_platform_dirs[0:len(expected_platform_dirs)]) >- >- def _verify_expectations_overrides(self, port_name): >- host = MockSystemHost() >- chromium_port = PortFactory(host).get("chromium-mac-leopard") >- chromium_base = chromium_port.path_from_chromium_base() >- port = PortFactory(host).get(port_name=port_name, options=None) >- >- expected_chromium_overrides = '// chromium overrides\n' >- expected_chrome_overrides = '// chrome overrides\n' >- chromium_path = host.filesystem.join(chromium_base, 'webkit', 'tools', 'layout_tests', 'test_expectations.txt') >- chrome_path = host.filesystem.join(chromium_base, 'webkit', 'tools', 'layout_tests', 'test_expectations_chrome.txt') >- >- host.filesystem.files[chromium_path] = expected_chromium_overrides >- host.filesystem.files[chrome_path] = None >- actual_chrome_overrides = port.test_expectations_overrides() >- self.assertEqual(expected_chromium_overrides, actual_chrome_overrides) >- >- host.filesystem.files[chrome_path] = expected_chrome_overrides >- actual_chrome_overrides = port.test_expectations_overrides() >- self.assertEqual(actual_chrome_overrides, expected_chromium_overrides + expected_chrome_overrides) >- >- def test_get_google_chrome_port(self): >- self._verify_baseline_search_path_startswith('google-chrome-linux32', ['google-chrome-linux32', 'chromium-linux-x86']) >- self._verify_baseline_search_path_startswith('google-chrome-linux64', ['google-chrome-linux64', 'chromium-linux']) >- self._verify_baseline_search_path_startswith('google-chrome-mac', ['google-chrome-mac', 'chromium-mac-snowleopard']) >- self._verify_baseline_search_path_startswith('google-chrome-win', ['google-chrome-win', 'chromium-win']) >- >- self._verify_expectations_overrides('google-chrome-mac') >- self._verify_expectations_overrides('google-chrome-win') >- self._verify_expectations_overrides('google-chrome-linux32') >- self._verify_expectations_overrides('google-chrome-linux64') >- >- def test_path_to_expectations(self): >- port_factory = PortFactory(MockSystemHost()) >- for port_name in ('google-chrome-linux32', 'google-chrome-linux64', 'google-chrome-mac', 'google-chrome-win'): >- self.assertTrue(port_factory.get(port_name).path_to_test_expectations_file().endswith('platform/chromium/TestExpectations')) >- >- >-if __name__ == '__main__': >- unittest.main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ojan
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 88824
: 146976