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

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

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
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 22 matching lines...) Expand all
33 33
34 from webkitpy.layout_tests.port import 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
43 """Test that the factory creates the proper port object for given combinatio n of port_name, host.platform, and options.""" 44 """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, 45 # FIXME: The ports themselves should expose what options they require,
45 # instead of passing generic "options". 46 # instead of passing generic "options".
46 47
47 def setUp(self): 48 def setUp(self):
48 self.webkit_options = MockOptions(pixel_tests=False) 49 self.webkit_options = MockOptions(pixel_tests=False)
49 50
50 def assert_port(self, port_name=None, os_name=None, os_version=None, options =None, cls=None): 51 def assert_port(self, port_name=None, os_name=None, os_version=None, options =None, cls=None):
51 host = MockSystemHost(os_name=os_name, os_version=os_version) 52 host = MockSystemHost(os_name=os_name, os_version=os_version)
52 port = factory.PortFactory(host).get(port_name, options=options) 53 port = factory.PortFactory(host).get(port_name, options=options)
(...skipping 23 matching lines...) Expand all
76 cls=win.WinPort) 77 cls=win.WinPort)
77 78
78 def test_unknown_specified(self): 79 def test_unknown_specified(self):
79 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t()).get, port_name='unknown') 80 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t()).get, port_name='unknown')
80 81
81 def test_unknown_default(self): 82 def test_unknown_default(self):
82 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t(os_name='vms')).get) 83 self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHos t(os_name='vms')).get)
83 84
84 def test_get_from_builder_name(self): 85 def test_get_from_builder_name(self):
85 self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_ name('WebKit Mac10.7').name(), 86 self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_ name('WebKit Mac10.7').name(),
86 'mac-lion') 87 'mac-lion')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/factory.py ('k') | Tools/Scripts/webkitpy/layout_tests/port/linux.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698