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

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

Issue 2132273002: Change DepsUpdater.is_manual_test to check wpt_automation directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove print statement 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_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 unittest 5 import unittest
6 6
7 from webkitpy.w3c.deps_updater import DepsUpdater 7 from webkitpy.w3c.deps_updater import DepsUpdater
8 from webkitpy.common.host_mock import MockHost 8 from webkitpy.common.host_mock import MockHost
9 from webkitpy.common.system.filesystem_mock import MockFileSystem
9 10
10 11
11 class DepsUpdaterTest(unittest.TestCase): 12 class DepsUpdaterTest(unittest.TestCase):
12 13
13 def test_parse_try_job_results(self): 14 def test_parse_try_job_results(self):
14 output = """Successes: 15 output = """Successes:
15 linux_builder http://example.com/linux_builder/builds/222 16 linux_builder http://example.com/linux_builder/builds/222
16 mac_builder http://example.com/mac_builder/builds/222 17 mac_builder http://example.com/mac_builder/builds/222
17 win_builder http://example.com/win_builder/builds/222 18 win_builder http://example.com/win_builder/builds/222
18 Failures: 19 Failures:
(...skipping 15 matching lines...) Expand all
34 ]), 35 ]),
35 'Failures': set([ 36 'Failures': set([
36 'android_builder', 37 'android_builder',
37 'chromeos_builder' 38 'chromeos_builder'
38 ]), 39 ]),
39 'Started': set([ 40 'Started': set([
40 'chromeos_generic', 41 'chromeos_generic',
41 'chromeos_daisy' 42 'chromeos_daisy'
42 ]) 43 ])
43 }) 44 })
45
46 def test_is_manual_test_regular_test(self):
47 updater = DepsUpdater(MockHost())
48 fs = MockFileSystem()
49 dirname = '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/a'
50 self.assertFalse(updater.is_manual_test(fs, dirname, 'test.html'))
51 self.assertFalse(updater.is_manual_test(fs, dirname, 'manual-foo.htm'))
52 self.assertFalse(updater.is_manual_test(fs, dirname, 'script.js'))
53
54 def test_is_manual_test_no_automation_file(self):
55 updater = DepsUpdater(MockHost())
56 fs = MockFileSystem()
57 dirname = '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/a'
58 self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.html'))
59 self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.htm'))
60 self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.xht'))
61
62 def test_is_manual_test_with_corresponding_automation_file(self):
63 updater = DepsUpdater(MockHost())
64 imported_dir = '/mock-checkout/third_party/WebKit/LayoutTests/imported/'
65 fs = MockFileSystem(files={
66 imported_dir + 'wpt_automation/a/x-manual-input.js': '',
67 imported_dir + 'wpt_automation/a/y-manual-automation.js': '',
68 })
69 self.assertFalse(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'y-m anual.html'))
70 self.assertFalse(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'x-m anual.html'))
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698