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

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

Issue 2183913002: Removes build and builder object refrences along with minor bug fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds more failure types and test expectation types to get_expectations Created 4 years, 5 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 7ae39f438a82f235468c05db16f988b67c46de45..7fd899373dd3ffa5e083cc1a7f72d9f84e1b2a4a 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
@@ -22,42 +22,51 @@ class UpdateW3CTestExpectationsTest(unittest.TestCase, W3CExpectationsLineAdder)
}
}
self.mock_dict_two = {
- 'fake/test/path.html': {
+ 'imported/fake/test/path.html': {
'one': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/626703'},
'two': {'expected': 'FAIL', 'actual': 'TIMEOUT', 'bug': 'crbug.com/626703'},
'three': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/626703'}
}
}
self.mock_dict_three = {
- 'fake/test/path.html': {
+ 'imported/fake/test/path.html': {
'four': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/626703'}}
}
+ self.mock_dict_four = {
+ 'imported/fake/test/path.html': {
+ 'one': {'expected': 'FAIL', 'actual': 'TIMEOUT', 'bug': 'crbug.com/626703'}
+ }
+ }
def test_merge_same_valued_keys(self):
self.assertEqual(self.merge_same_valued_keys(self.mock_dict_one['fake/test/path.html']), {
('two', 'one'): {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/626703'}
})
- self.assertEqual(self.merge_same_valued_keys(self.mock_dict_two['fake/test/path.html']), {
+ self.assertEqual(self.merge_same_valued_keys(self.mock_dict_two['imported/fake/test/path.html']), {
('three', 'one'): {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/626703'},
'two': {'expected': 'FAIL', 'actual': 'TIMEOUT', 'bug': 'crbug.com/626703'}
})
def test_get_expectations(self):
- self.assertEqual(self.get_expectations({'expected': 'FAIL', 'actual': 'PASS'}), ['Pass'])
- self.assertEqual(self.get_expectations({'expected': 'FAIL', 'actual': 'TIMEOUT'}), ['Timeout'])
- self.assertEqual(self.get_expectations({'expected': 'TIMEOUT', 'actual': 'PASS'}), ['Pass', 'Timeout'])
-
- def test_create_line_list(self):
- self.assertEqual(self.create_line_list(self.mock_dict_one),
- ['crbug.com/626703 [ two ] fake/test/path.html [ Pass ]',
- 'crbug.com/626703 [ one ] fake/test/path.html [ Pass ]'])
+ self.assertEqual(self.get_expectations({'expected': 'FAIL', 'actual': 'PASS'}), set(['Pass']))
+ self.assertEqual(self.get_expectations({'expected': 'FAIL', 'actual': 'TIMEOUT'}), set(['Timeout']))
+ self.assertEqual(self.get_expectations({'expected': 'TIMEOUT', 'actual': 'PASS'}), set(['Pass']))
+ self.assertEqual(
+ self.get_expectations({'expected': 'PASS', 'actual': 'TIMEOUT CRASH FAIL'}),
+ set(['Crash', 'Failure', 'Timeout']))
+ self.assertEqual(self.get_expectations({'expected': 'SLOW CRASH FAIL TIMEOUT', 'actual': 'PASS'}), set(['Pass']))
+
+ def test_create_line_list_old_tests(self):
+ self.assertEqual(self.create_line_list(self.mock_dict_one), [])
+
+ def test_create_line_list_new_tests(self):
self.assertEqual(self.create_line_list(self.mock_dict_two),
- ['crbug.com/626703 [ three ] fake/test/path.html [ Pass ]',
- 'crbug.com/626703 [ two ] fake/test/path.html [ Timeout ]',
- 'crbug.com/626703 [ one ] fake/test/path.html [ Pass ]'])
+ ['crbug.com/626703 [ three ] imported/fake/test/path.html [ Pass ]',
+ 'crbug.com/626703 [ two ] imported/fake/test/path.html [ Timeout ]',
+ 'crbug.com/626703 [ one ] imported/fake/test/path.html [ Pass ]'])
def test_merge_dicts_with_conflict_raise_exception(self):
- self.assertRaises(ValueError, self.merge_dicts, self.mock_dict_one, self.mock_dict_two)
+ self.assertRaises(ValueError, self.merge_dicts, self.mock_dict_two, self.mock_dict_four)
def test_merge_dicts_merges_second_dict_into_first(self):
output = self.merge_dicts(self.mock_dict_one, self.mock_dict_three)
« 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