| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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', | 99 '/mock-checkout/third_party/WebKit/css', |
| 100 '/mock-checkout/third_party/WebKit/LayoutTests/imported/csswg-test') | 100 '/mock-checkout/third_party/WebKit/LayoutTests/external/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 updater = DepsUpdater(host) | 107 updater = DepsUpdater(host) |
| 108 updater._generate_manifest( | 108 updater._generate_manifest( |
| 109 '/mock-checkout/third_party/WebKit/wpt', | 109 '/mock-checkout/third_party/WebKit/wpt', |
| 110 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt') | 110 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt') |
| 111 self.assertEqual( | 111 self.assertEqual( |
| 112 host.executive.calls, | 112 host.executive.calls, |
| 113 [ | 113 [ |
| 114 [ | 114 [ |
| 115 '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/th
irdparty/wpt/manifest', | 115 '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/th
irdparty/wpt/manifest', |
| 116 '--work', | 116 '--work', |
| 117 '--tests-root', | 117 '--tests-root', |
| 118 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt' | 118 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' |
| 119 ], | 119 ], |
| 120 [ | 120 [ |
| 121 'git', | 121 'git', |
| 122 'add', | 122 'add', |
| 123 '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/
MANIFEST.json' | 123 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' |
| 124 ] | 124 ] |
| 125 ]) | 125 ]) |
| OLD | NEW |