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

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

Issue 2613753002: W3C import: Update manifest-updating step after upstream changes. (Closed)
Patch Set: Created 3 years, 11 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.common.host_mock import MockHost 7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.common.system.executive_mock import MockExecutive 8 from webkitpy.common.system.executive_mock import MockExecutive
9 from webkitpy.w3c.deps_updater import DepsUpdater 9 from webkitpy.w3c.deps_updater import DepsUpdater
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 updater.host.environ['BUILDBOT_BUILDERNAME'] = 'b' 82 updater.host.environ['BUILDBOT_BUILDERNAME'] = 'b'
83 updater.host.environ['BUILDBOT_BUILDNUMBER'] = '123' 83 updater.host.environ['BUILDBOT_BUILDNUMBER'] = '123'
84 description = updater._cl_description() 84 description = updater._cl_description()
85 self.assertEqual( 85 self.assertEqual(
86 description, 86 description,
87 ('Last commit message\n' 87 ('Last commit message\n'
88 'Build: https://build.chromium.org/p/my.master/builders/b/builds/12 3\n\n' 88 'Build: https://build.chromium.org/p/my.master/builders/b/builds/12 3\n\n'
89 'TBR=qyearsley@chromium.org\n' 89 'TBR=qyearsley@chromium.org\n'
90 'NOEXPORT=true')) 90 'NOEXPORT=true'))
91 self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=% B']]) 91 self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=% B']])
92
93 def test_generate_manifest_command_not_found(self):
94 # If we're updating csswg-test, then the manifest file won't be found.
95 host = MockHost()
96 host.filesystem.files = {}
97 updater = DepsUpdater(host)
98 updater._generate_manifest(
99 '/mock-checkout/third_party/WebKit/css',
100 '/mock-checkout/third_party/WebKit/LayoutTests/imported/csswg-test')
101 self.assertEqual(host.executive.calls, [])
102
103 def test_generate_manifest_successful_run(self):
104 # This test doesn't test any aspect of the real manifest script, it just
105 # asserts that DepsUpdater._generate_manifest would invoke the script.
106 host = MockHost()
107 host.filesystem.files = {
108 '/mock-checkout/third_party/WebKit/wpt/manifest': 'dummy content'
109 }
110 updater = DepsUpdater(host)
111 updater._generate_manifest(
112 '/mock-checkout/third_party/WebKit/wpt',
113 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt')
114 self.assertEqual(
115 host.executive.calls,
116 [
117 [
118 '/mock-checkout/third_party/WebKit/wpt/manifest',
119 '--work',
120 '--tests-root',
121 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt'
122 ],
123 [
124 'git',
125 'add',
126 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/ MANIFEST.json'
127 ]
128 ])
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