| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 updater._has_changes = lambda: True | 68 updater._has_changes = lambda: True |
| 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\nUsing update-w3c-deps in Chromium aaaa.\n\n') | 78 'Import 1111\n\n' |
| 79 'Using update-w3c-deps in Chromium aaaa.\n\n' |
| 80 'NOEXPORT=true') |
| 79 | 81 |
| 80 def test_cl_description_with_empty_environ(self): | 82 def test_cl_description_with_empty_environ(self): |
| 81 host = MockHost() | 83 host = MockHost() |
| 82 host.executive = MockExecutive(output='Last commit message\n') | 84 host.executive = MockExecutive(output='Last commit message\n') |
| 83 updater = DepsUpdater(host) | 85 updater = DepsUpdater(host) |
| 84 description = updater._cl_description() | 86 description = updater._cl_description() |
| 85 self.assertEqual( | 87 self.assertEqual( |
| 86 description, | 88 description, |
| 87 ('Last commit message\n' | 89 ('Last commit message\n' |
| 88 'TBR=qyearsley@chromium.org\n' | 90 'TBR=qyearsley@chromium.org\n' |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 '--work', | 131 '--work', |
| 130 '--tests-root', | 132 '--tests-root', |
| 131 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' | 133 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' |
| 132 ], | 134 ], |
| 133 [ | 135 [ |
| 134 'git', | 136 'git', |
| 135 'add', | 137 'add', |
| 136 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' | 138 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' |
| 137 ] | 139 ] |
| 138 ]) | 140 ]) |
| OLD | NEW |