| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 updater._commit_changes('dummy message') | 69 updater._commit_changes('dummy message') |
| 70 self.assertEqual( | 70 self.assertEqual( |
| 71 host.executive.calls, | 71 host.executive.calls, |
| 72 [['git', 'commit', '--all', '-F', '-']]) | 72 [['git', 'commit', '--all', '-F', '-']]) |
| 73 | 73 |
| 74 def test_commit_message(self): | 74 def test_commit_message(self): |
| 75 updater = DepsUpdater(MockHost()) | 75 updater = DepsUpdater(MockHost()) |
| 76 self.assertEqual( | 76 self.assertEqual( |
| 77 updater._commit_message('aaaa', '1111'), | 77 updater._commit_message('aaaa', '1111'), |
| 78 'Import 1111\n\n' | 78 'Import 1111\n\n' |
| 79 'Using update-w3c-deps in Chromium aaaa.\n\n' | 79 'Using wpt-import in Chromium aaaa.\n\n' |
| 80 'NOEXPORT=true') | 80 'NOEXPORT=true') |
| 81 | 81 |
| 82 def test_cl_description_with_empty_environ(self): | 82 def test_cl_description_with_empty_environ(self): |
| 83 host = MockHost() | 83 host = MockHost() |
| 84 host.executive = MockExecutive(output='Last commit message\n') | 84 host.executive = MockExecutive(output='Last commit message\n') |
| 85 updater = DepsUpdater(host) | 85 updater = DepsUpdater(host) |
| 86 description = updater._cl_description() | 86 description = updater._cl_description() |
| 87 self.assertEqual( | 87 self.assertEqual( |
| 88 description, | 88 description, |
| 89 ('Last commit message\n' | 89 ('Last commit message\n' |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 '--work', | 142 '--work', |
| 143 '--tests-root', | 143 '--tests-root', |
| 144 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' | 144 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' |
| 145 ], | 145 ], |
| 146 [ | 146 [ |
| 147 'git', | 147 'git', |
| 148 'add', | 148 'add', |
| 149 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' | 149 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' |
| 150 ] | 150 ] |
| 151 ]) | 151 ]) |
| OLD | NEW |