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

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: 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 02b754eac825fc0e7768682417125c6a48e4653a..4ece77a371109f52d42a7bb2f74b3025c3a7cc9d 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.
jeffcarp 2017/02/17 20:56:38 If this comment is at the beginning of a function,
qyearsley 2017/02/17 23:56:52 I don't personally think so -- in this case (and i
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 ]',
qyearsley 2017/02/14 21:41:06 Another test added here to assert that added lines
])
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'],
qyearsley 2017/02/14 21:41:06 Capitalization changed to test the case-insensitiv
}
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), [])
qyearsley 2017/02/14 21:41:06 This line tests the case where all OS types are co
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