| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import copy | 5 import copy |
| 6 import json | 6 import json |
| 7 | 7 |
| 8 from webkitpy.common.host_mock import MockHost | 8 from webkitpy.common.host_mock import MockHost |
| 9 from webkitpy.common.net.buildbot import Build | 9 from webkitpy.common.net.buildbot import Build |
| 10 from webkitpy.common.net.buildbot_mock import MockBuildBot | 10 from webkitpy.common.net.buildbot_mock import MockBuildBot |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 {'Pass', 'Failure'}) | 178 {'Pass', 'Failure'}) |
| 179 self.assertEqual( | 179 self.assertEqual( |
| 180 updater.get_expectations({'expected': 'PASS', 'actual': 'TIMEOUT CRA
SH TEXT'}), | 180 updater.get_expectations({'expected': 'PASS', 'actual': 'TIMEOUT CRA
SH TEXT'}), |
| 181 {'Crash', 'Failure', 'Timeout'}) | 181 {'Crash', 'Failure', 'Timeout'}) |
| 182 self.assertEqual( | 182 self.assertEqual( |
| 183 updater.get_expectations({'expected': 'SLOW CRASH FAIL TIMEOUT', 'ac
tual': 'PASS'}), | 183 updater.get_expectations({'expected': 'SLOW CRASH FAIL TIMEOUT', 'ac
tual': 'PASS'}), |
| 184 {'Pass'}) | 184 {'Pass'}) |
| 185 self.assertEqual( | 185 self.assertEqual( |
| 186 updater.get_expectations({'expected': 'Pass', 'actual': 'IMAGE+TEXT
IMAGE IMAGE'}), | 186 updater.get_expectations({'expected': 'Pass', 'actual': 'IMAGE+TEXT
IMAGE IMAGE'}), |
| 187 {'Failure'}) | 187 {'Failure'}) |
| 188 self.assertEqual( |
| 189 updater.get_expectations({'expected': 'Pass', 'actual': 'MISSING'}), |
| 190 {'Skip'}) |
| 191 self.assertEqual( |
| 192 updater.get_expectations({'expected': 'Pass', 'actual': 'TIMEOUT'},
test_name='foo/bar-manual.html'), |
| 193 {'Skip'}) |
| 188 | 194 |
| 189 def test_create_line_list_old_tests(self): | 195 def test_create_line_list_old_tests(self): |
| 190 # In this example, there are two failures that are not in w3c tests. | 196 # In this example, there are two failures that are not in w3c tests. |
| 191 updater = WPTExpectationsUpdater(self.mock_host()) | 197 updater = WPTExpectationsUpdater(self.mock_host()) |
| 192 results = { | 198 results = { |
| 193 'fake/test/path.html': { | 199 'fake/test/path.html': { |
| 194 'one': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/
test'}, | 200 'one': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/
test'}, |
| 195 'two': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/
test'}, | 201 'two': {'expected': 'FAIL', 'actual': 'PASS', 'bug': 'crbug.com/
test'}, |
| 196 } | 202 } |
| 197 } | 203 } |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 'test-win-win7', | 508 'test-win-win7', |
| 503 'test-win-win10', | 509 'test-win-win10', |
| 504 ): {'expected': 'PASS', 'actual': 'MISSING', 'bug': 'crbug.com/t
est'} | 510 ): {'expected': 'PASS', 'actual': 'MISSING', 'bug': 'crbug.com/t
est'} |
| 505 } | 511 } |
| 506 } | 512 } |
| 507 tests_to_rebaseline, _ = updater.get_tests_to_rebaseline(results) | 513 tests_to_rebaseline, _ = updater.get_tests_to_rebaseline(results) |
| 508 self.assertEqual(tests_to_rebaseline, []) | 514 self.assertEqual(tests_to_rebaseline, []) |
| 509 self.assertEqual( | 515 self.assertEqual( |
| 510 updater.create_line_list(results), | 516 updater.create_line_list(results), |
| 511 ['crbug.com/test external/wpt/x-manual.html [ Skip ]']) | 517 ['crbug.com/test external/wpt/x-manual.html [ Skip ]']) |
| OLD | NEW |