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

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

Issue 2799683003: Add skip expectations for new manual tests with a missing or timeout result. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 from webkitpy.common.host_mock import MockHost 7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.common.net.buildbot import Build 8 from webkitpy.common.net.buildbot import Build
9 from webkitpy.common.net.buildbot_mock import MockBuildBot 9 from webkitpy.common.net.buildbot_mock import MockBuildBot
10 from webkitpy.common.net.layout_test_results import LayoutTestResult, LayoutTest Results 10 from webkitpy.common.net.layout_test_results import LayoutTestResult, LayoutTest Results
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 updater = WPTExpectationsUpdater(self.mock_host()) 459 updater = WPTExpectationsUpdater(self.mock_host())
460 updater.get_issue_number = lambda: 'None' 460 updater.get_issue_number = lambda: 'None'
461 self.assertEqual(1, updater.run(args=[])) 461 self.assertEqual(1, updater.run(args=[]))
462 self.assertLog(['ERROR: No issue on current branch.\n']) 462 self.assertLog(['ERROR: No issue on current branch.\n'])
463 463
464 def test_run_no_try_results(self): 464 def test_run_no_try_results(self):
465 updater = WPTExpectationsUpdater(self.mock_host()) 465 updater = WPTExpectationsUpdater(self.mock_host())
466 updater.get_latest_try_jobs = lambda: [] 466 updater.get_latest_try_jobs = lambda: []
467 self.assertEqual(1, updater.run(args=[])) 467 self.assertEqual(1, updater.run(args=[]))
468 self.assertLog(['ERROR: No try job information was collected.\n']) 468 self.assertLog(['ERROR: No try job information was collected.\n'])
469
470 def test_new_manual_tests_get_skip_expectation(self):
471 host = self.mock_host()
472 host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/Layou tTests/external/wpt/x-manual.html', '<html>')
473 updater = WPTExpectationsUpdater(host)
474 results = {
475 'external/wpt/x-manual.html': {
476 (
477 'test-linux-precise',
478 'test-linux-trusty',
479 'test-mac-mac10.10',
480 'test-mac-mac10.11',
481 'test-win-win7',
482 'test-win-win10',
483 ): {'expected': 'PASS', 'actual': 'MISSING', 'bug': 'crbug.com/t est'}
484 }
485 }
486 results_copy = copy.deepcopy(results)
487 self.assertEqual(
488 updater.get_tests_to_rebaseline(results),
489 ([], results_copy))
490 self.assertEqual(
491 updater.create_line_list(results),
492 ['crbug.com/test external/wpt/x-manual.html [ Skip ]'])
OLDNEW
« 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