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

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

Issue 2604213002: When auto-importing, don't limit rebaselining to directly modified tests. (Closed)
Patch Set: Update test 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 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 fca01909133bc08c6dffa0b842096d00910399bd..c5c96014cb8b81d28b41a1a9718db1904e053950 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
@@ -251,7 +251,7 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
'<script src="/resources/testharness.js"></script>')
line_adder = W3CExpectationsLineAdder(self.host)
tests_to_rebaseline, _ = line_adder.get_tests_to_rebaseline(
- ['imported/fake/test/path.html', 'imported/other/test/path.html'], self.mock_dict_two)
+ self.mock_dict_two)
# The other test doesn't have an entry in the test results dict, so it is not listed as a test to rebaseline.
self.assertEqual(tests_to_rebaseline, ['imported/fake/test/path.html'])
@@ -260,7 +260,7 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
'this file does not look like a testharness JS test.')
line_adder = W3CExpectationsLineAdder(self.host)
tests_to_rebaseline, _ = line_adder.get_tests_to_rebaseline(
- ['imported/fake/test/path.html'], self.mock_dict_two)
+ self.mock_dict_two)
self.assertEqual(tests_to_rebaseline, [])
def test_get_tests_to_rebaseline_returns_updated_dict(self):
@@ -275,7 +275,7 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
'<script src="/resources/testharness.js"></script>')
line_adder = W3CExpectationsLineAdder(self.host)
tests_to_rebaseline, modified_test_results = line_adder.get_tests_to_rebaseline(
- ['imported/fake/test/path.html'], test_results_dict)
+ test_results_dict)
self.assertEqual(tests_to_rebaseline, ['imported/fake/test/path.html'])
# The record for the builder with a timeout is kept, but not with a text mismatch,
# since that should be covered by downloading a new baseline.
@@ -299,7 +299,7 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
'<script src="/resources/testharness.js"></script>')
line_adder = W3CExpectationsLineAdder(self.host)
tests_to_rebaseline, modified_test_results = line_adder.get_tests_to_rebaseline(
- ['imported/fake/test/path.html'], test_results_dict)
+ test_results_dict)
self.assertEqual(tests_to_rebaseline, ['imported/fake/test/path.html'])
# The record for the builder with a timeout is kept, but not with a text mismatch,
# since that should be covered by downloading a new baseline.
@@ -337,17 +337,3 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
'https://codereview.chromium.org/api/11112222/1'
])
self.assertLog(['ERROR: No try job information was collected.\n'])
-
- def test_get_modified_existing_tests(self):
- line_adder = W3CExpectationsLineAdder(self.host)
- modified_files = [
- 'third_party/WebKit/LayoutTests/a/b.html',
- 'third_party/WebKit/LayoutTests/a/c.html',
- 'x/y/z.cc',
- ]
- self.host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/a/b.html'] = ''
- self.host.filesystem.files['/mock-checkout/x/y/z.cc'] = ''
- self.host.executive = MockExecutive(output='\n'.join(modified_files))
- tests = line_adder.get_modified_existing_tests()
- self.assertEqual(tests, ['a/b.html'])
- self.assertEqual(self.host.executive.calls, [['git', 'diff', 'origin/master', '--name-only', '--diff-filter=AMR']])
« 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