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

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

Issue 2605103002: Add example cases in unit tests for tests with "Slow" expectations. (Closed)
Patch Set: Created 4 years 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/tool/commands/rebaseline_cl_unittest.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 0d7ccc3f659a5cae6812eec1662e142fd102100e..af9f91749114a76465defd776602155aef61495d 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
@@ -287,6 +287,30 @@ class UpdateW3CTestExpectationsTest(LoggingTestCase):
# The original dict isn't modified.
self.assertEqual(test_results_dict, test_results_dict_copy)
+ def test_get_tests_to_rebaseline_also_returns_slow_tests(self):
+ test_results_dict = {
+ 'imported/fake/test/path.html': {
+ 'one': {'expected': 'SLOW', 'actual': 'TEXT', 'bug': 'crbug.com/626703'},
+ 'two': {'expected': 'SLOW', 'actual': 'TIMEOUT', 'bug': 'crbug.com/626703'},
+ },
+ }
+ test_results_dict_copy = copy.deepcopy(test_results_dict)
+ 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_to_rebaseline, modified_test_results = line_adder.get_tests_to_rebaseline(
+ ['imported/fake/test/path.html'], 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.
+ self.assertEqual(modified_test_results, {
+ 'imported/fake/test/path.html': {
+ 'two': {'expected': 'SLOW', 'actual': 'TIMEOUT', 'bug': 'crbug.com/626703'},
+ },
+ })
+ # The original dict isn't modified.
+ self.assertEqual(test_results_dict, test_results_dict_copy)
+
def test_run_no_issue_number(self):
line_adder = W3CExpectationsLineAdder(self.host)
line_adder.get_issue_number = lambda: 'None'
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698