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

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

Issue 1286373004: Treat win8 machines as win10 ports and remove baseline/specifier support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/win.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 self.assert_name(None, 'xp', 'win-xp') 77 self.assert_name(None, 'xp', 'win-xp')
78 self.assert_name('win', 'xp', 'win-xp') 78 self.assert_name('win', 'xp', 'win-xp')
79 self.assert_name('win-xp', 'xp', 'win-xp') 79 self.assert_name('win-xp', 'xp', 'win-xp')
80 self.assert_name('win-xp', '7sp0', 'win-xp') 80 self.assert_name('win-xp', '7sp0', 'win-xp')
81 81
82 self.assert_name(None, '10', 'win-win10') 82 self.assert_name(None, '10', 'win-win10')
83 self.assert_name('win', '10', 'win-win10') 83 self.assert_name('win', '10', 'win-win10')
84 self.assert_name('win-win10', '10', 'win-win10') 84 self.assert_name('win-win10', '10', 'win-win10')
85 self.assert_name('win-win10', 'xp', 'win-win10') 85 self.assert_name('win-win10', 'xp', 'win-win10')
86 86
87 self.assert_name(None, '8', 'win-win8') 87 self.assert_name(None, '8', 'win-win10')
88 self.assert_name(None, '8.1', 'win-win8') 88 self.assert_name(None, '8.1', 'win-win10')
89 self.assert_name('win', '8', 'win-win8') 89 self.assert_name('win', '8', 'win-win10')
90 self.assert_name('win', '8.1', 'win-win8') 90 self.assert_name('win', '8.1', 'win-win10')
91 self.assert_name('win-win8', '8', 'win-win8')
92 self.assert_name('win-win8', '8.1', 'win-win8')
93 self.assert_name('win-win8', 'vista', 'win-win8')
94 91
95 self.assert_name(None, '7sp1', 'win-win7') 92 self.assert_name(None, '7sp1', 'win-win7')
96 self.assert_name(None, '7sp0', 'win-win7') 93 self.assert_name(None, '7sp0', 'win-win7')
97 self.assert_name(None, 'vista', 'win-win7') 94 self.assert_name(None, 'vista', 'win-win7')
98 self.assert_name('win', '7sp1', 'win-win7') 95 self.assert_name('win', '7sp1', 'win-win7')
99 self.assert_name('win', '7sp0', 'win-win7') 96 self.assert_name('win', '7sp0', 'win-win7')
100 self.assert_name('win', 'vista', 'win-win7') 97 self.assert_name('win', 'vista', 'win-win7')
101 self.assert_name('win-win7', '7sp1', 'win-win7') 98 self.assert_name('win-win7', '7sp1', 'win-win7')
102 self.assert_name('win-win7', '7sp0', 'win-win7') 99 self.assert_name('win-win7', '7sp0', 'win-win7')
103 self.assert_name('win-win7', 'vista', 'win-win7') 100 self.assert_name('win-win7', 'vista', 'win-win7')
104 self.assert_name('win-win7', 'xp', 'win-win7') 101 self.assert_name('win-win7', 'xp', 'win-win7')
105 102
106 self.assert_name(None, 'future', 'win-win10') 103 self.assert_name(None, 'future', 'win-win10')
107 self.assert_name('win', 'future', 'win-win10') 104 self.assert_name('win', 'future', 'win-win10')
108 self.assert_name('win-win8', 'future', 'win-win8')
109 self.assert_name('win-win10', 'future', 'win-win10') 105 self.assert_name('win-win10', 'future', 'win-win10')
110 106
111 self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'win-xp ') 107 self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'win-xp ')
112 108
113 def assert_baseline_paths(self, port_name, *expected_paths): 109 def assert_baseline_paths(self, port_name, *expected_paths):
114 port = self.make_port(port_name=port_name) 110 port = self.make_port(port_name=port_name)
115 self.assertEqual(port.baseline_path(), port._webkit_baseline_path(expect ed_paths[0])) 111 self.assertEqual(port.baseline_path(), port._webkit_baseline_path(expect ed_paths[0]))
116 self.assertEqual(len(port.baseline_search_path()), len(expected_paths)) 112 self.assertEqual(len(port.baseline_search_path()), len(expected_paths))
117 for i, path in enumerate(expected_paths): 113 for i, path in enumerate(expected_paths):
118 self.assertTrue(port.baseline_search_path()[i].endswith(path)) 114 self.assertTrue(port.baseline_search_path()[i].endswith(path))
119 115
120 def test_baseline_path(self): 116 def test_baseline_path(self):
121 self.assert_baseline_paths('win-xp', 'win-xp', '/win7', '/win8', '/win') 117 self.assert_baseline_paths('win-xp', 'win-xp', '/win7', '/win')
122 self.assert_baseline_paths('win-win7', 'win7', 'win8', '/win') 118 self.assert_baseline_paths('win-win7', 'win7', '/win')
123 self.assert_baseline_paths('win-win8', 'win8', '/win')
124 self.assert_baseline_paths('win-win10', 'win') 119 self.assert_baseline_paths('win-win10', 'win')
125 120
126 def test_build_path(self): 121 def test_build_path(self):
127 # Test that optional paths are used regardless of whether they exist. 122 # Test that optional paths are used regardless of whether they exist.
128 options = MockOptions(configuration='Release', build_directory='/foo') 123 options = MockOptions(configuration='Release', build_directory='/foo')
129 self.assert_build_path(options, ['/mock-checkout/out/Release'], '/foo/Re lease') 124 self.assert_build_path(options, ['/mock-checkout/out/Release'], '/foo/Re lease')
130 125
131 # Test that optional relative paths are returned unmodified. 126 # Test that optional relative paths are returned unmodified.
132 options = MockOptions(configuration='Release', build_directory='foo') 127 options = MockOptions(configuration='Release', build_directory='foo')
133 self.assert_build_path(options, ['/mock-checkout/out/Release'], 'foo/Rel ease') 128 self.assert_build_path(options, ['/mock-checkout/out/Release'], 'foo/Rel ease')
(...skipping 16 matching lines...) Expand all
150 145
151 def test_operating_system(self): 146 def test_operating_system(self):
152 self.assertEqual('win', self.make_port().operating_system()) 147 self.assertEqual('win', self.make_port().operating_system())
153 148
154 def test_driver_name_option(self): 149 def test_driver_name_option(self):
155 self.assertTrue(self.make_port()._path_to_driver().endswith('content_she ll.exe')) 150 self.assertTrue(self.make_port()._path_to_driver().endswith('content_she ll.exe'))
156 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver.exe')) 151 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver.exe'))
157 152
158 def test_path_to_image_diff(self): 153 def test_path_to_image_diff(self):
159 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff.exe') 154 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff.exe')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/win.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698