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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py

Issue 669663002: Remove get_test function in test_expectations_unittest.py (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class Base(unittest.TestCase): 44 class Base(unittest.TestCase):
45 # Note that all of these tests are written assuming the configuration 45 # Note that all of these tests are written assuming the configuration
46 # being tested is Windows XP, Release build. 46 # being tested is Windows XP, Release build.
47 47
48 def __init__(self, testFunc): 48 def __init__(self, testFunc):
49 host = MockHost() 49 host = MockHost()
50 self._port = host.port_factory.get('test-win-xp', None) 50 self._port = host.port_factory.get('test-win-xp', None)
51 self._exp = None 51 self._exp = None
52 unittest.TestCase.__init__(self, testFunc) 52 unittest.TestCase.__init__(self, testFunc)
53 53
54 def get_test(self, test_name):
55 # FIXME: Remove this routine and just reference test names directly.
56 return test_name
57
58 def get_basic_tests(self): 54 def get_basic_tests(self):
59 return [self.get_test('failures/expected/text.html'), 55 return ['failures/expected/text.html',
60 self.get_test('failures/expected/image_checksum.html'), 56 'failures/expected/image_checksum.html',
61 self.get_test('failures/expected/crash.html'), 57 'failures/expected/crash.html',
62 self.get_test('failures/expected/needsrebaseline.html'), 58 'failures/expected/needsrebaseline.html',
63 self.get_test('failures/expected/needsmanualrebaseline.html'), 59 'failures/expected/needsmanualrebaseline.html',
64 self.get_test('failures/expected/missing_text.html'), 60 'failures/expected/missing_text.html',
65 self.get_test('failures/expected/image.html'), 61 'failures/expected/image.html',
66 self.get_test('failures/expected/timeout.html'), 62 'failures/expected/timeout.html',
67 self.get_test('passes/text.html')] 63 'passes/text.html']
68 64
69 65
70 def get_basic_expectations(self): 66 def get_basic_expectations(self):
71 return """ 67 return """
72 Bug(test) failures/expected/text.html [ Failure ] 68 Bug(test) failures/expected/text.html [ Failure ]
73 Bug(test) failures/expected/crash.html [ WontFix ] 69 Bug(test) failures/expected/crash.html [ WontFix ]
74 Bug(test) failures/expected/needsrebaseline.html [ NeedsRebaseline ] 70 Bug(test) failures/expected/needsrebaseline.html [ NeedsRebaseline ]
75 Bug(test) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ] 71 Bug(test) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ]
76 Bug(test) failures/expected/missing_image.html [ Rebaseline Missing ] 72 Bug(test) failures/expected/missing_image.html [ Rebaseline Missing ]
77 Bug(test) failures/expected/image_checksum.html [ WontFix ] 73 Bug(test) failures/expected/image_checksum.html [ WontFix ]
78 Bug(test) failures/expected/image.html [ WontFix Mac ] 74 Bug(test) failures/expected/image.html [ WontFix Mac ]
79 """ 75 """
80 76
81 def parse_exp(self, expectations, overrides=None, is_lint_mode=False): 77 def parse_exp(self, expectations, overrides=None, is_lint_mode=False):
82 expectations_dict = OrderedDict() 78 expectations_dict = OrderedDict()
83 expectations_dict['expectations'] = expectations 79 expectations_dict['expectations'] = expectations
84 if overrides: 80 if overrides:
85 expectations_dict['overrides'] = overrides 81 expectations_dict['overrides'] = overrides
86 self._port.expectations_dict = lambda: expectations_dict 82 self._port.expectations_dict = lambda: expectations_dict
87 expectations_to_lint = expectations_dict if is_lint_mode else None 83 expectations_to_lint = expectations_dict if is_lint_mode else None
88 self._exp = TestExpectations(self._port, self.get_basic_tests(), expecta tions_dict=expectations_to_lint, is_lint_mode=is_lint_mode) 84 self._exp = TestExpectations(self._port, self.get_basic_tests(), expecta tions_dict=expectations_to_lint, is_lint_mode=is_lint_mode)
89 85
90 def assert_exp_list(self, test, results): 86 def assert_exp_list(self, test, results):
91 self.assertEqual(self._exp.get_expectations(self.get_test(test)), set(re sults)) 87 self.assertEqual(self._exp.get_expectations(test), set(results))
92 88
93 def assert_exp(self, test, result): 89 def assert_exp(self, test, result):
94 self.assert_exp_list(test, [result]) 90 self.assert_exp_list(test, [result])
95 91
96 def assert_bad_expectations(self, expectations, overrides=None): 92 def assert_bad_expectations(self, expectations, overrides=None):
97 self.assertRaises(ParseError, self.parse_exp, expectations, is_lint_mode =True, overrides=overrides) 93 self.assertRaises(ParseError, self.parse_exp, expectations, is_lint_mode =True, overrides=overrides)
98 94
99 95
100 class BasicTests(Base): 96 class BasicTests(Base):
101 def test_basic(self): 97 def test_basic(self):
102 self.parse_exp(self.get_basic_expectations()) 98 self.parse_exp(self.get_basic_expectations())
103 self.assert_exp('failures/expected/text.html', FAIL) 99 self.assert_exp('failures/expected/text.html', FAIL)
104 self.assert_exp_list('failures/expected/image_checksum.html', [WONTFIX, SKIP]) 100 self.assert_exp_list('failures/expected/image_checksum.html', [WONTFIX, SKIP])
105 self.assert_exp('passes/text.html', PASS) 101 self.assert_exp('passes/text.html', PASS)
106 self.assert_exp('failures/expected/image.html', PASS) 102 self.assert_exp('failures/expected/image.html', PASS)
107 103
108 104
109 class MiscTests(Base): 105 class MiscTests(Base):
110 def test_multiple_results(self): 106 def test_multiple_results(self):
111 self.parse_exp('Bug(x) failures/expected/text.html [ Crash Failure ]') 107 self.parse_exp('Bug(x) failures/expected/text.html [ Crash Failure ]')
112 self.assertEqual(self._exp.get_expectations( 108 self.assertEqual(self._exp.get_expectations('failures/expected/text.html '), set([FAIL, CRASH]))
113 self.get_test('failures/expected/text.html')),
114 set([FAIL, CRASH]))
115 109
116 def test_result_was_expected(self): 110 def test_result_was_expected(self):
117 # test basics 111 # test basics
118 self.assertEqual(TestExpectations.result_was_expected(PASS, set([PASS]), test_needs_rebaselining=False), True) 112 self.assertEqual(TestExpectations.result_was_expected(PASS, set([PASS]), test_needs_rebaselining=False), True)
119 self.assertEqual(TestExpectations.result_was_expected(FAIL, set([PASS]), test_needs_rebaselining=False), False) 113 self.assertEqual(TestExpectations.result_was_expected(FAIL, set([PASS]), test_needs_rebaselining=False), False)
120 114
121 # test handling of SKIPped tests and results 115 # test handling of SKIPped tests and results
122 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH]) , test_needs_rebaselining=False), True) 116 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH]) , test_needs_rebaselining=False), True)
123 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([LEAK]), test_needs_rebaselining=False), True) 117 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([LEAK]), test_needs_rebaselining=False), True)
124 118
(...skipping 24 matching lines...) Expand all
149 self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL, I MAGE, CRASH])), set(['txt', 'png', 'wav'])) 143 self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL, I MAGE, CRASH])), set(['txt', 'png', 'wav']))
150 self.assertEqual(TestExpectations.suffixes_for_expectations(set()), set( )) 144 self.assertEqual(TestExpectations.suffixes_for_expectations(set()), set( ))
151 145
152 def test_category_expectations(self): 146 def test_category_expectations(self):
153 # This test checks unknown tests are not present in the 147 # This test checks unknown tests are not present in the
154 # expectations and that known test part of a test category is 148 # expectations and that known test part of a test category is
155 # present in the expectations. 149 # present in the expectations.
156 exp_str = 'Bug(x) failures/expected [ WontFix ]' 150 exp_str = 'Bug(x) failures/expected [ WontFix ]'
157 self.parse_exp(exp_str) 151 self.parse_exp(exp_str)
158 test_name = 'failures/expected/unknown-test.html' 152 test_name = 'failures/expected/unknown-test.html'
159 unknown_test = self.get_test(test_name) 153 unknown_test = test_name
160 self.assertRaises(KeyError, self._exp.get_expectations, 154 self.assertRaises(KeyError, self._exp.get_expectations,
161 unknown_test) 155 unknown_test)
162 self.assert_exp_list('failures/expected/crash.html', [WONTFIX, SKIP]) 156 self.assert_exp_list('failures/expected/crash.html', [WONTFIX, SKIP])
163 157
164 def test_get_expectations_string(self): 158 def test_get_expectations_string(self):
165 self.parse_exp(self.get_basic_expectations()) 159 self.parse_exp(self.get_basic_expectations())
166 self.assertEqual(self._exp.get_expectations_string( 160 self.assertEqual(self._exp.get_expectations_string('failures/expected/te xt.html'), 'FAIL')
167 self.get_test('failures/expected/text.html')),
168 'FAIL')
169 161
170 def test_expectation_to_string(self): 162 def test_expectation_to_string(self):
171 # Normal cases are handled by other tests. 163 # Normal cases are handled by other tests.
172 self.parse_exp(self.get_basic_expectations()) 164 self.parse_exp(self.get_basic_expectations())
173 self.assertRaises(ValueError, self._exp.expectation_to_string, 165 self.assertRaises(ValueError, self._exp.expectation_to_string,
174 -1) 166 -1)
175 167
176 def test_get_test_set(self): 168 def test_get_test_set(self):
177 # Handle some corner cases for this routine not covered by other tests. 169 # Handle some corner cases for this routine not covered by other tests.
178 self.parse_exp(self.get_basic_expectations()) 170 self.parse_exp(self.get_basic_expectations())
179 s = self._exp.get_test_set(WONTFIX) 171 s = self._exp.get_test_set(WONTFIX)
180 self.assertEqual(s, 172 self.assertEqual(s, set(['failures/expected/crash.html', 'failures/expec ted/image_checksum.html']))
181 set([self.get_test('failures/expected/crash.html'),
182 self.get_test('failures/expected/image_checksum.html')]))
183 173
184 def test_needs_rebaseline_reftest(self): 174 def test_needs_rebaseline_reftest(self):
185 try: 175 try:
186 filesystem = self._port.host.filesystem 176 filesystem = self._port.host.filesystem
187 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsrebaseline.html'), 'content') 177 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsrebaseline.html'), 'content')
188 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsrebaseline-expected.html'), 'content') 178 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsrebaseline-expected.html'), 'content')
189 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsmanualrebaseline.html'), 'content') 179 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsmanualrebaseline.html'), 'content')
190 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsmanualrebaseline-expected.html'), 'content') 180 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'failures/expected/needsmanualrebaseline-expected.html'), 'content')
191 self.parse_exp("""Bug(user) failures/expected/needsrebaseline.html [ NeedsRebaseline ] 181 self.parse_exp("""Bug(user) failures/expected/needsrebaseline.html [ NeedsRebaseline ]
192 Bug(user) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ] """, is_lint_mode=True) 182 Bug(user) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ] """, is_lint_mode=True)
193 self.assertFalse(True, "ParseError wasn't raised") 183 self.assertFalse(True, "ParseError wasn't raised")
194 except ParseError, e: 184 except ParseError, e:
195 warnings = """expectations:1 A reftest cannot be marked as NeedsReba seline/NeedsManualRebaseline failures/expected/needsrebaseline.html 185 warnings = """expectations:1 A reftest cannot be marked as NeedsReba seline/NeedsManualRebaseline failures/expected/needsrebaseline.html
196 expectations:2 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseli ne failures/expected/needsmanualrebaseline.html""" 186 expectations:2 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseli ne failures/expected/needsmanualrebaseline.html"""
197 self.assertEqual(str(e), warnings) 187 self.assertEqual(str(e), warnings)
198 188
199 def test_parse_warning(self): 189 def test_parse_warning(self):
200 try: 190 try:
201 filesystem = self._port.host.filesystem 191 filesystem = self._port.host.filesystem
202 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'disabled-test.html-disabled'), 'content') 192 filesystem.write_text_file(filesystem.join(self._port.layout_tests_d ir(), 'disabled-test.html-disabled'), 'content')
203 self.get_test('disabled-test.html-disabled'), 193 'disabled-test.html-disabled',
204 self.parse_exp("Bug(user) [ FOO ] failures/expected/text.html [ Fail ure ]\n" 194 self.parse_exp("Bug(user) [ FOO ] failures/expected/text.html [ Fail ure ]\n"
205 "Bug(user) non-existent-test.html [ Failure ]\n" 195 "Bug(user) non-existent-test.html [ Failure ]\n"
206 "Bug(user) disabled-test.html-disabled [ ImageOnlyFailure ]", is _lint_mode=True) 196 "Bug(user) disabled-test.html-disabled [ ImageOnlyFailure ]", is _lint_mode=True)
207 self.assertFalse(True, "ParseError wasn't raised") 197 self.assertFalse(True, "ParseError wasn't raised")
208 except ParseError, e: 198 except ParseError, e:
209 warnings = ("expectations:1 Unrecognized specifier 'foo' failures/ex pected/text.html\n" 199 warnings = ("expectations:1 Unrecognized specifier 'foo' failures/ex pected/text.html\n"
210 "expectations:2 Path does not exist. non-existent-test.h tml") 200 "expectations:2 Path does not exist. non-existent-test.h tml")
211 self.assertEqual(str(e), warnings) 201 self.assertEqual(str(e), warnings)
212 202
213 def test_parse_warnings_are_logged_if_not_in_lint_mode(self): 203 def test_parse_warnings_are_logged_if_not_in_lint_mode(self):
(...skipping 29 matching lines...) Expand all
243 self.assert_exp_list('failures/expected/image.html', [CRASH]) 233 self.assert_exp_list('failures/expected/image.html', [CRASH])
244 234
245 def test_overrides__duplicate(self): 235 def test_overrides__duplicate(self):
246 self.assert_bad_expectations("Bug(exp) failures/expected/text.html [ Fai lure ]", 236 self.assert_bad_expectations("Bug(exp) failures/expected/text.html [ Fai lure ]",
247 "Bug(override) failures/expected/text.html [ ImageOnlyFailure ]\n" 237 "Bug(override) failures/expected/text.html [ ImageOnlyFailure ]\n"
248 "Bug(override) failures/expected/text.html [ Crash ]\n") 238 "Bug(override) failures/expected/text.html [ Crash ]\n")
249 239
250 def test_pixel_tests_flag(self): 240 def test_pixel_tests_flag(self):
251 def match(test, result, pixel_tests_enabled): 241 def match(test, result, pixel_tests_enabled):
252 return self._exp.matches_an_expected_result( 242 return self._exp.matches_an_expected_result(
253 self.get_test(test), result, pixel_tests_enabled, sanitizer_is_e nabled=False) 243 test, result, pixel_tests_enabled, sanitizer_is_enabled=False)
254 244
255 self.parse_exp(self.get_basic_expectations()) 245 self.parse_exp(self.get_basic_expectations())
256 self.assertTrue(match('failures/expected/text.html', FAIL, True)) 246 self.assertTrue(match('failures/expected/text.html', FAIL, True))
257 self.assertTrue(match('failures/expected/text.html', FAIL, False)) 247 self.assertTrue(match('failures/expected/text.html', FAIL, False))
258 self.assertFalse(match('failures/expected/text.html', CRASH, True)) 248 self.assertFalse(match('failures/expected/text.html', CRASH, True))
259 self.assertFalse(match('failures/expected/text.html', CRASH, False)) 249 self.assertFalse(match('failures/expected/text.html', CRASH, False))
260 self.assertTrue(match('failures/expected/image_checksum.html', PASS, Tru e)) 250 self.assertTrue(match('failures/expected/image_checksum.html', PASS, Tru e))
261 self.assertTrue(match('failures/expected/image_checksum.html', PASS, Fal se)) 251 self.assertTrue(match('failures/expected/image_checksum.html', PASS, Fal se))
262 self.assertTrue(match('failures/expected/crash.html', PASS, False)) 252 self.assertTrue(match('failures/expected/crash.html', PASS, False))
263 self.assertTrue(match('failures/expected/needsrebaseline.html', TEXT, Tr ue)) 253 self.assertTrue(match('failures/expected/needsrebaseline.html', TEXT, Tr ue))
264 self.assertFalse(match('failures/expected/needsrebaseline.html', CRASH, True)) 254 self.assertFalse(match('failures/expected/needsrebaseline.html', CRASH, True))
265 self.assertTrue(match('failures/expected/needsmanualrebaseline.html', TE XT, True)) 255 self.assertTrue(match('failures/expected/needsmanualrebaseline.html', TE XT, True))
266 self.assertFalse(match('failures/expected/needsmanualrebaseline.html', C RASH, True)) 256 self.assertFalse(match('failures/expected/needsmanualrebaseline.html', C RASH, True))
267 self.assertTrue(match('passes/text.html', PASS, False)) 257 self.assertTrue(match('passes/text.html', PASS, False))
268 258
269 def test_sanitizer_flag(self): 259 def test_sanitizer_flag(self):
270 def match(test, result): 260 def match(test, result):
271 return self._exp.matches_an_expected_result( 261 return self._exp.matches_an_expected_result(
272 self.get_test(test), result, pixel_tests_are_enabled=False, sani tizer_is_enabled=True) 262 test, result, pixel_tests_are_enabled=False, sanitizer_is_enable d=True)
273 263
274 self.parse_exp(""" 264 self.parse_exp("""
275 Bug(test) failures/expected/crash.html [ Crash ] 265 Bug(test) failures/expected/crash.html [ Crash ]
276 Bug(test) failures/expected/image.html [ ImageOnlyFailure ] 266 Bug(test) failures/expected/image.html [ ImageOnlyFailure ]
277 Bug(test) failures/expected/text.html [ Failure ] 267 Bug(test) failures/expected/text.html [ Failure ]
278 Bug(test) failures/expected/timeout.html [ Timeout ] 268 Bug(test) failures/expected/timeout.html [ Timeout ]
279 """) 269 """)
280 self.assertTrue(match('failures/expected/crash.html', CRASH)) 270 self.assertTrue(match('failures/expected/crash.html', CRASH))
281 self.assertTrue(match('failures/expected/image.html', PASS)) 271 self.assertTrue(match('failures/expected/image.html', PASS))
282 self.assertTrue(match('failures/expected/text.html', PASS)) 272 self.assertTrue(match('failures/expected/text.html', PASS))
(...skipping 10 matching lines...) Expand all
293 def test_bot_test_expectations(self): 283 def test_bot_test_expectations(self):
294 """Test that expectations are merged rather than overridden when using f laky option 'unexpected'.""" 284 """Test that expectations are merged rather than overridden when using f laky option 'unexpected'."""
295 test_name1 = 'failures/expected/text.html' 285 test_name1 = 'failures/expected/text.html'
296 test_name2 = 'passes/text.html' 286 test_name2 = 'passes/text.html'
297 287
298 expectations_dict = OrderedDict() 288 expectations_dict = OrderedDict()
299 expectations_dict['expectations'] = "Bug(x) %s [ ImageOnlyFailure ]\nBug (x) %s [ Slow ]\n" % (test_name1, test_name2) 289 expectations_dict['expectations'] = "Bug(x) %s [ ImageOnlyFailure ]\nBug (x) %s [ Slow ]\n" % (test_name1, test_name2)
300 self._port.expectations_dict = lambda: expectations_dict 290 self._port.expectations_dict = lambda: expectations_dict
301 291
302 expectations = TestExpectations(self._port, self.get_basic_tests()) 292 expectations = TestExpectations(self._port, self.get_basic_tests())
303 self.assertEqual(expectations.get_expectations(self.get_test(test_name1) ), set([IMAGE])) 293 self.assertEqual(expectations.get_expectations(test_name1), set([IMAGE]) )
304 self.assertEqual(expectations.get_expectations(self.get_test(test_name2) ), set([SLOW])) 294 self.assertEqual(expectations.get_expectations(test_name2), set([SLOW]))
305 295
306 def bot_expectations(): 296 def bot_expectations():
307 return {test_name1: ['PASS', 'TIMEOUT'], test_name2: ['CRASH']} 297 return {test_name1: ['PASS', 'TIMEOUT'], test_name2: ['CRASH']}
308 self._port.bot_expectations = bot_expectations 298 self._port.bot_expectations = bot_expectations
309 self._port._options.ignore_flaky_tests = 'unexpected' 299 self._port._options.ignore_flaky_tests = 'unexpected'
310 300
311 expectations = TestExpectations(self._port, self.get_basic_tests()) 301 expectations = TestExpectations(self._port, self.get_basic_tests())
312 self.assertEqual(expectations.get_expectations(self.get_test(test_name1) ), set([PASS, IMAGE, TIMEOUT])) 302 self.assertEqual(expectations.get_expectations(test_name1), set([PASS, I MAGE, TIMEOUT]))
313 self.assertEqual(expectations.get_expectations(self.get_test(test_name2) ), set([CRASH, SLOW])) 303 self.assertEqual(expectations.get_expectations(test_name2), set([CRASH, SLOW]))
314 304
315 class SkippedTests(Base): 305 class SkippedTests(Base):
316 def check(self, expectations, overrides, skips, lint=False, expected_results =[WONTFIX, SKIP, FAIL]): 306 def check(self, expectations, overrides, skips, lint=False, expected_results =[WONTFIX, SKIP, FAIL]):
317 port = MockHost().port_factory.get('test-win-xp') 307 port = MockHost().port_factory.get('test-win-xp')
318 port._filesystem.write_text_file(port._filesystem.join(port.layout_tests _dir(), 'failures/expected/text.html'), 'foo') 308 port._filesystem.write_text_file(port._filesystem.join(port.layout_tests _dir(), 'failures/expected/text.html'), 'foo')
319 expectations_dict = OrderedDict() 309 expectations_dict = OrderedDict()
320 expectations_dict['expectations'] = expectations 310 expectations_dict['expectations'] = expectations
321 if overrides: 311 if overrides:
322 expectations_dict['overrides'] = overrides 312 expectations_dict['overrides'] = overrides
323 port.expectations_dict = lambda: expectations_dict 313 port.expectations_dict = lambda: expectations_dict
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 897
908 def disabled_test_string_whitespace_stripping(self): 898 def disabled_test_string_whitespace_stripping(self):
909 # FIXME: Re-enable this test once we rework the code to no longer suppor t the old syntax. 899 # FIXME: Re-enable this test once we rework the code to no longer suppor t the old syntax.
910 self.assert_round_trip('\n', '') 900 self.assert_round_trip('\n', '')
911 self.assert_round_trip(' [ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') 901 self.assert_round_trip(' [ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]')
912 self.assert_round_trip('[ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') 902 self.assert_round_trip('[ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]')
913 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.') 903 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.')
914 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] ba r [ BAZ ] # Qux.') 904 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] ba r [ BAZ ] # Qux.')
915 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.') 905 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.')
916 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FO O ] bar [ BAZ ] # Qux.') 906 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FO O ] bar [ BAZ ] # Qux.')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698