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