Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py

Issue 18292002: Rename chromium-android port to android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a TODO to remove '--platform chromium' Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/factory.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 13 matching lines...) Expand all
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 import unittest2 as unittest 29 import unittest2 as unittest
30 30
31 from webkitpy.tool.mocktool import MockOptions 31 from webkitpy.tool.mocktool import MockOptions
32 from webkitpy.common.system.systemhost_mock import MockSystemHost 32 from webkitpy.common.system.systemhost_mock import MockSystemHost
33 33
34 from webkitpy.layout_tests.port import chromium_android 34 from webkitpy.layout_tests.port import android
35 from webkitpy.layout_tests.port import linux 35 from webkitpy.layout_tests.port import linux
36 from webkitpy.layout_tests.port import mac 36 from webkitpy.layout_tests.port import mac
37 from webkitpy.layout_tests.port import win 37 from webkitpy.layout_tests.port import win
38 from webkitpy.layout_tests.port import factory 38 from webkitpy.layout_tests.port import factory
39 from webkitpy.layout_tests.port import test 39 from webkitpy.layout_tests.port import test
40 40
41 41
42 class FactoryTest(unittest.TestCase): 42 class FactoryTest(unittest.TestCase):
43 """Test that the factory creates the proper port object for given combinatio n of port_name, host.platform, and options.""" 43 """Test that the factory creates the proper port object for given combinatio n of port_name, host.platform, and options."""
44 # FIXME: The ports themselves should expose what options they require, 44 # FIXME: The ports themselves should expose what options they require,
(...skipping 11 matching lines...) Expand all
56 self.assert_port(port_name='mac', os_name='mac', os_version='snowleopard ', 56 self.assert_port(port_name='mac', os_name='mac', os_version='snowleopard ',
57 cls=mac.MacPort) 57 cls=mac.MacPort)
58 self.assert_port(port_name='chromium', os_name='mac', os_version='lion', 58 self.assert_port(port_name='chromium', os_name='mac', os_version='lion',
59 cls=mac.MacPort) 59 cls=mac.MacPort)
60 60
61 def test_linux(self): 61 def test_linux(self):
62 self.assert_port(port_name='linux', cls=linux.LinuxPort) 62 self.assert_port(port_name='linux', cls=linux.LinuxPort)
63 self.assert_port(port_name='chromium', os_name='linux', os_version='luci d', 63 self.assert_port(port_name='chromium', os_name='linux', os_version='luci d',
64 cls=linux.LinuxPort) 64 cls=linux.LinuxPort)
65 65
66 def test_chromium_android(self): 66 def test_android(self):
67 self.assert_port(port_name='chromium-android', cls=chromium_android.Chro miumAndroidPort) 67 self.assert_port(port_name='android', cls=android.AndroidPort)
68 # NOTE: We can't check for port_name=chromium here, as this will append the host's 68 # NOTE: We can't check for port_name=chromium here, as this will append the host's
69 # operating system, whereas host!=target for Android. 69 # operating system, whereas host!=target for Android.
70 70
71 def test_win(self): 71 def test_win(self):
72 self.assert_port(port_name='win-xp', cls=win.WinPort) 72 self.assert_port(port_name='win-xp', cls=win.WinPort)
73 self.assert_port(port_name='win', os_name='win', os_version='xp', 73 self.assert_port(port_name='win', os_name='win', os_version='xp',
74 cls=win.WinPort) 74 cls=win.WinPort)
75 self.assert_port(port_name='chromium', os_name='win', os_version='xp', 75 self.assert_port(port_name='chromium', os_name='win', os_version='xp',
76 cls=win.WinPort) 76 cls=win.WinPort)
77 77
78 def test_unknown_specified(self): 78 def test_unknown_specified(self):
79 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t()).get, port_name='unknown') 79 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t()).get, port_name='unknown')
80 80
81 def test_unknown_default(self): 81 def test_unknown_default(self):
82 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t(os_name='vms')).get) 82 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t(os_name='vms')).get)
83 83
84 def test_get_from_builder_name(self): 84 def test_get_from_builder_name(self):
85 self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_ name('WebKit Mac10.7').name(), 85 self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_ name('WebKit Mac10.7').name(),
86 'mac-lion') 86 'mac-lion')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/factory.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698