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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py

Issue 2644783003: Regenerate MANIFEST.json when WPT tests are run (Closed)
Patch Set: Created 3 years, 11 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
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 self.assertIn('external/wpt/dom/ranges/Range-attributes.html', port.test s([])) 271 self.assertIn('external/wpt/dom/ranges/Range-attributes.html', port.test s([]))
272 self.assertNotIn('external/wpt/console/console-is-a-namespace.any.js', p ort.tests([])) 272 self.assertNotIn('external/wpt/console/console-is-a-namespace.any.js', p ort.tests([]))
273 self.assertEqual(port.tests(['external']), ['external/wpt/dom/ranges/Ran ge-attributes.html']) 273 self.assertEqual(port.tests(['external']), ['external/wpt/dom/ranges/Ran ge-attributes.html'])
274 self.assertEqual(port.tests(['external/']), ['external/wpt/dom/ranges/Ra nge-attributes.html']) 274 self.assertEqual(port.tests(['external/']), ['external/wpt/dom/ranges/Ra nge-attributes.html'])
275 self.assertEqual(port.tests(['external/csswg-test']), []) 275 self.assertEqual(port.tests(['external/csswg-test']), [])
276 self.assertEqual(port.tests(['external/wpt']), ['external/wpt/dom/ranges /Range-attributes.html']) 276 self.assertEqual(port.tests(['external/wpt']), ['external/wpt/dom/ranges /Range-attributes.html'])
277 self.assertEqual(port.tests(['external/wpt/']), ['external/wpt/dom/range s/Range-attributes.html']) 277 self.assertEqual(port.tests(['external/wpt/']), ['external/wpt/dom/range s/Range-attributes.html'])
278 self.assertEqual(port.tests(['external/wpt/dom/ranges/Range-attributes.h tml']), 278 self.assertEqual(port.tests(['external/wpt/dom/ranges/Range-attributes.h tml']),
279 ['external/wpt/dom/ranges/Range-attributes.html']) 279 ['external/wpt/dom/ranges/Range-attributes.html'])
280 280
281 # Assert manifest was regenerated once
qyearsley 2017/01/19 23:56:20 Nit: period.
qyearsley 2017/01/19 23:56:20 Nit: period.
282 self.assertEqual(port.host.executive.calls, [
283 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/thirdpart y/wpt/wpt/manifest',
284 '--work', '--tests-root', '/mock-checkout/third_party/WebKit/Layout Tests/external/wpt']
285 ])
286
281 def test_is_test_file(self): 287 def test_is_test_file(self):
282 port = self.make_port(with_tests=True) 288 port = self.make_port(with_tests=True)
283 is_test_file = functools.partial(Port.is_test_file, port, port.host.file system) 289 is_test_file = functools.partial(Port.is_test_file, port, port.host.file system)
284 self.assertTrue(is_test_file('', 'foo.html')) 290 self.assertTrue(is_test_file('', 'foo.html'))
285 self.assertTrue(is_test_file('', 'foo.svg')) 291 self.assertTrue(is_test_file('', 'foo.svg'))
286 self.assertTrue(is_test_file('', 'test-ref-test.html')) 292 self.assertTrue(is_test_file('', 'test-ref-test.html'))
287 self.assertTrue(is_test_file('inspector-unit', 'trie.js')) 293 self.assertTrue(is_test_file('inspector-unit', 'trie.js'))
288 self.assertFalse(is_test_file('inspector-unit', 'foo.html')) 294 self.assertFalse(is_test_file('inspector-unit', 'foo.html'))
289 self.assertFalse(is_test_file('inspector', 'devtools.js')) 295 self.assertFalse(is_test_file('inspector', 'devtools.js'))
290 self.assertFalse(is_test_file('', 'foo.png')) 296 self.assertFalse(is_test_file('', 'foo.png'))
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 self.assertEqual(suite.args, ['--args']) 612 self.assertEqual(suite.args, ['--args'])
607 self.assertEqual(suite.reference_args, []) 613 self.assertEqual(suite.reference_args, [])
608 614
609 def test_non_default_reference_args(self): 615 def test_non_default_reference_args(self):
610 suite = VirtualTestSuite(prefix='suite', base='base/foo', args=['--args' ], references_use_default_args=False) 616 suite = VirtualTestSuite(prefix='suite', base='base/foo', args=['--args' ], references_use_default_args=False)
611 self.assertEqual(suite.args, ['--args']) 617 self.assertEqual(suite.args, ['--args'])
612 self.assertEqual(suite.reference_args, suite.args) 618 self.assertEqual(suite.reference_args, suite.args)
613 619
614 def test_no_slash(self): 620 def test_no_slash(self):
615 self.assertRaises(AssertionError, VirtualTestSuite, prefix='suite/bar', base='base/foo', args=['--args']) 621 self.assertRaises(AssertionError, VirtualTestSuite, prefix='suite/bar', base='base/foo', args=['--args'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698