| 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.chromium_commit import ChromiumCommit | 9 from webkitpy.w3c.chromium_commit import ChromiumCommit |
| 10 from webkitpy.w3c.test_exporter_unittest import mock_command_exec | 10 from webkitpy.w3c.common_unittest import mock_command_exec |
| 11 | 11 |
| 12 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/external/wpt/' | 12 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/external/wpt/' |
| 13 | 13 |
| 14 | 14 |
| 15 class ChromiumCommitTest(unittest.TestCase): | 15 class ChromiumCommitTest(unittest.TestCase): |
| 16 | 16 |
| 17 def test_accepts_sha(self): | 17 def test_accepts_sha(self): |
| 18 chromium_commit = ChromiumCommit(MockHost(), sha='deadbeefcafe') | 18 chromium_commit = ChromiumCommit(MockHost(), sha='deadbeefcafe') |
| 19 | 19 |
| 20 self.assertEqual(chromium_commit.sha, 'deadbeefcafe') | 20 self.assertEqual(chromium_commit.sha, 'deadbeefcafe') |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 | 42 |
| 43 position_footer = 'Cr-Commit-Position: refs/heads/master@{#789}' | 43 position_footer = 'Cr-Commit-Position: refs/heads/master@{#789}' |
| 44 chromium_commit = ChromiumCommit(host, position=position_footer) | 44 chromium_commit = ChromiumCommit(host, position=position_footer) |
| 45 | 45 |
| 46 files = chromium_commit.filtered_changed_files() | 46 files = chromium_commit.filtered_changed_files() |
| 47 | 47 |
| 48 expected_files = ['file1', 'file3'] | 48 expected_files = ['file1', 'file3'] |
| 49 qualified_expected_files = [CHROMIUM_WPT_DIR + f for f in expected_files
] | 49 qualified_expected_files = [CHROMIUM_WPT_DIR + f for f in expected_files
] |
| 50 | 50 |
| 51 self.assertEqual(files, qualified_expected_files) | 51 self.assertEqual(files, qualified_expected_files) |
| OLD | NEW |