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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py

Issue 2291193004: In update-w3c-test-expectations, handle non-existent/non-test files. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
index 433bf7298de58ec349e555b838863a6749d131bc..a3928dcde9e823371412c360d421a02c27f01c1c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
@@ -199,24 +199,28 @@ class UpdateW3CTestExpectationsTest(unittest.TestCase):
self.assertEqual(value, 'dont copy me\n\n# Tests added from W3C auto import bot\n[ ] but copy me')
def test_is_js_test_true(self):
- self.host.filesystem.files['/mock-checkout/foo/bar.html'] = '''
- <script src="/resources/testharness.js"></script>'''
+ self.host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/foo/bar.html'] = (
+ '<script src="/resources/testharness.js"></script>')
line_adder = W3CExpectationsLineAdder(self.host)
self.assertTrue(line_adder.is_js_test('foo/bar.html'))
def test_is_js_test_false(self):
- self.host.filesystem.files['/mock-checkout/foo/bar.html'] = '''
- <script src="ref-test.html"></script>'''
+ self.host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/foo/bar.html'] = (
+ '<script src="ref-test.html"></script>')
+ line_adder = W3CExpectationsLineAdder(self.host)
+ self.assertFalse(line_adder.is_js_test('foo/bar.html'))
+
+ def test_is_js_test_non_existent_file(self):
line_adder = W3CExpectationsLineAdder(self.host)
self.assertFalse(line_adder.is_js_test('foo/bar.html'))
def test_get_test_to_rebaseline(self):
self.host = MockHost()
- self.host.filesystem.files['/mock-checkout/imported/fake/test/path.html'] = '''
- <script src="/resources/testharness.js"></script>'''
+ self.host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/imported/fake/test/path.html'] = (
+ '<script src="/resources/testharness.js"></script>')
line_adder = W3CExpectationsLineAdder(self.host)
- tests = ['imported/fake/test/path.html']
- test_dict = {'../../../imported/fake/test/path.html': self.mock_dict_two['imported/fake/test/path.html']}
+ tests = ['third_party/WebKit/LayoutTests/imported/fake/test/path.html']
+ test_dict = {'imported/fake/test/path.html': self.mock_dict_two['imported/fake/test/path.html']}
tests_to_rebaseline, tests_results = line_adder.get_tests_to_rebaseline(tests, test_dict)
- self.assertEqual(tests_to_rebaseline, ['../../../imported/fake/test/path.html'])
+ self.assertEqual(tests_to_rebaseline, ['imported/fake/test/path.html'])
self.assertEqual(tests_results, test_dict)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698