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.common.system.filesystem_mock import MockFileSystem | 9 from webkitpy.common.system.filesystem_mock import MockFileSystem |
10 from webkitpy.w3c.local_wpt import LocalWPT | 10 from webkitpy.w3c.local_wpt import LocalWPT |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 commit = local_wpt.most_recent_chromium_commit() | 78 commit = local_wpt.most_recent_chromium_commit() |
79 self.assertEqual(commit, (None, None)) | 79 self.assertEqual(commit, (None, None)) |
80 | 80 |
81 def test_create_branch_with_patch(self): | 81 def test_create_branch_with_patch(self): |
82 host = MockHost() | 82 host = MockHost() |
83 host.filesystem = MockFileSystem() | 83 host.filesystem = MockFileSystem() |
84 | 84 |
85 local_wpt = LocalWPT(host) | 85 local_wpt = LocalWPT(host) |
86 | 86 |
87 local_branch_name = local_wpt.create_branch_with_patch('message', 'patch
') | 87 local_branch_name = local_wpt.create_branch_with_patch('message', 'patch
', 'author') |
88 self.assertEqual(len(host.executive.calls), 10) | 88 self.assertEqual(len(host.executive.calls), 10) |
89 self.assertEqual(local_branch_name, 'chromium-export-try') | 89 self.assertEqual(local_branch_name, 'chromium-export-try') |
90 # TODO(jeffcarp): Add more specific assertions | 90 self.assertEqual(host.executive.calls, [ |
| 91 ['git', 'clone', 'https://chromium.googlesource.com/external/w3c/web
-platform-tests.git', '/tmp/wpt'], |
| 92 ['git', 'reset', '--hard', 'HEAD'], |
| 93 ['git', 'clean', '-fdx'], |
| 94 ['git', 'checkout', 'origin/master'], |
| 95 ['git', 'branch', '-a'], |
| 96 ['git', 'branch', '-a'], |
| 97 ['git', 'checkout', '-b', 'chromium-export-try'], |
| 98 ['git', 'apply', '-'], |
| 99 ['git', 'commit', '--author', 'author', '-am', 'message'], |
| 100 ['git', 'push', 'github', 'chromium-export-try']]) |
OLD | NEW |