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

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

Issue 569913002: fix virtual_test_suites() for browser_test ports (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rework implementation of test_virtual_test_suites(), browser_test_unittest 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 19 matching lines...) Expand all
30 30
31 from webkitpy.layout_tests.port import mac 31 from webkitpy.layout_tests.port import mac
32 from webkitpy.layout_tests.port import port_testcase 32 from webkitpy.layout_tests.port import port_testcase
33 from webkitpy.tool.mocktool import MockOptions 33 from webkitpy.tool.mocktool import MockOptions
34 34
35 35
36 class MacPortTest(port_testcase.PortTestCase): 36 class MacPortTest(port_testcase.PortTestCase):
37 os_name = 'mac' 37 os_name = 'mac'
38 os_version = 'snowleopard' 38 os_version = 'snowleopard'
39 port_name = 'mac' 39 port_name = 'mac'
40 full_port_name = 'mac-snowleopard'
40 port_maker = mac.MacPort 41 port_maker = mac.MacPort
41 42
42 def assert_name(self, port_name, os_version_string, expected): 43 def assert_name(self, port_name, os_version_string, expected):
43 port = self.make_port(os_version=os_version_string, port_name=port_name) 44 port = self.make_port(os_version=os_version_string, port_name=port_name)
44 self.assertEqual(expected, port.name()) 45 self.assertEqual(expected, port.name())
45 46
46 def test_versions(self): 47 def test_versions(self):
47 self.assertTrue(self.make_port().name() in ('mac-snowleopard', 'mac-lion ', 'mac-mountainlion', 'mac-mavericks')) 48 self.assertTrue(self.make_port().name() in ('mac-snowleopard', 'mac-lion ', 'mac-mountainlion', 'mac-mavericks'))
48 49
49 self.assert_name(None, 'snowleopard', 'mac-snowleopard') 50 self.assert_name(None, 'snowleopard', 'mac-snowleopard')
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 # Check with 'xcodebuild' being newer. 100 # Check with 'xcodebuild' being newer.
100 port.host.filesystem.mtime = lambda f: 5 if '/xcodebuild/' in f else 4 101 port.host.filesystem.mtime = lambda f: 5 if '/xcodebuild/' in f else 4
101 self.assertEqual(port._build_path(), '/mock-checkout/xcodebuild/Release' ) 102 self.assertEqual(port._build_path(), '/mock-checkout/xcodebuild/Release' )
102 103
103 def test_driver_name_option(self): 104 def test_driver_name_option(self):
104 self.assertTrue(self.make_port()._path_to_driver().endswith('Content She ll')) 105 self.assertTrue(self.make_port()._path_to_driver().endswith('Content She ll'))
105 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver')) 106 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver'))
106 107
107 def test_path_to_image_diff(self): 108 def test_path_to_image_diff(self):
108 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff') 109 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698