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

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

Issue 2694293003: Simplify specifiers when all platforms are covered, and sort lines. (Closed)
Patch Set: Rebased Created 3 years, 10 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/wpt_expectations_updater.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/wpt_expectations_updater_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater_unittest.py
index b859ae124fc6d3ae657b09291cb0ae6e991de6d9..80e882201adb1129dc6acc7547b9250408994596 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater_unittest.py
@@ -150,21 +150,24 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
self.assertEqual(updater.create_line_list(results), [])
def test_create_line_list_new_tests(self):
- # In this example, there are unexpected non-fail results in w3c tests.
+ # In this example, there are three unexpected results. The new
+ # test expectation lines are sorted by test, and then specifier.
updater = WPTExpectationsUpdater(self.mock_host())
results = {
+ 'external/fake/test/zzzz.html': {
+ 'test-mac-mac10.10': {'expected': 'PASS', 'actual': 'FAIL', 'bug': 'crbug.com/test'},
+ },
'external/fake/test/path.html': {
'test-linux-trusty': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/test'},
- 'test-mac-mac10.10': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/test'},
'test-mac-mac10.11': {'expected': 'FAIL', 'actual': 'TIMEOUT', 'bug': 'crbug.com/test'},
- }
+ },
}
self.assertEqual(
updater.create_line_list(results),
[
'crbug.com/test [ Linux ] external/fake/test/path.html [ Pass ]',
- 'crbug.com/test [ Mac10.10 ] external/fake/test/path.html [ Pass ]',
'crbug.com/test [ Mac10.11 ] external/fake/test/path.html [ Timeout ]',
+ 'crbug.com/test [ Mac10.10 ] external/fake/test/zzzz.html [ Failure ]',
])
def test_specifier_part(self):
@@ -183,13 +186,14 @@ class WPTExpectationsUpdaterTest(LoggingTestCase):
macros = {
'mac': ['Mac10.10', 'mac10.11'],
'win': ['Win7', 'win10'],
- 'linux': ['Trusty'],
+ 'Linux': ['TRUSTY'],
}
self.assertEqual(WPTExpectationsUpdater.simplify_specifiers(['mac10.10', 'mac10.11'], macros), ['Mac'])
self.assertEqual(WPTExpectationsUpdater.simplify_specifiers(['Mac10.10', 'Mac10.11', 'Trusty'], macros), ['Linux', 'Mac'])
self.assertEqual(
WPTExpectationsUpdater.simplify_specifiers(['Mac10.10', 'Mac10.11', 'Trusty', 'Win7', 'Win10'], macros), [])
self.assertEqual(WPTExpectationsUpdater.simplify_specifiers(['a', 'b', 'c'], {}), ['A', 'B', 'C'])
+ self.assertEqual(WPTExpectationsUpdater.simplify_specifiers(['Mac', 'Win', 'Linux'], macros), [])
def test_merge_dicts_with_conflict_raise_exception(self):
updater = WPTExpectationsUpdater(self.mock_host())
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698