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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 updater = DepsUpdater(host) | 97 updater = DepsUpdater(host) |
98 updater._generate_manifest( | 98 updater._generate_manifest( |
99 '/mock-checkout/third_party/WebKit/css', | 99 '/mock-checkout/third_party/WebKit/css', |
100 '/mock-checkout/third_party/WebKit/LayoutTests/imported/csswg-test') | 100 '/mock-checkout/third_party/WebKit/LayoutTests/imported/csswg-test') |
101 self.assertEqual(host.executive.calls, []) | 101 self.assertEqual(host.executive.calls, []) |
102 | 102 |
103 def test_generate_manifest_successful_run(self): | 103 def test_generate_manifest_successful_run(self): |
104 # This test doesn't test any aspect of the real manifest script, it just | 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. | 105 # asserts that DepsUpdater._generate_manifest would invoke the script. |
106 host = MockHost() | 106 host = MockHost() |
107 host.filesystem.files = { | |
108 '/mock-checkout/third_party/WebKit/wpt/manifest': 'dummy content' | |
109 } | |
110 updater = DepsUpdater(host) | 107 updater = DepsUpdater(host) |
111 updater._generate_manifest( | 108 updater._generate_manifest( |
112 '/mock-checkout/third_party/WebKit/wpt', | 109 '/mock-checkout/third_party/WebKit/wpt', |
113 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt') | 110 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt') |
114 self.assertEqual( | 111 self.assertEqual( |
115 host.executive.calls, | 112 host.executive.calls, |
116 [ | 113 [ |
117 [ | 114 [ |
118 '/mock-checkout/third_party/WebKit/wpt/manifest', | 115 '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/th
irdparty/wpt/manifest', |
119 '--work', | 116 '--work', |
120 '--tests-root', | 117 '--tests-root', |
121 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt' | 118 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt' |
122 ], | 119 ], |
123 [ | 120 [ |
124 'git', | 121 'git', |
125 'add', | 122 'add', |
126 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/
MANIFEST.json' | 123 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/
MANIFEST.json' |
127 ] | 124 ] |
128 ]) | 125 ]) |
OLD | NEW |