Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py

Issue 2583723002: Use LocalWPT.test_patch when filtering exportable commits (Closed)
Patch Set: Fix test_exporter_unittest Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 from webkitpy.common.host_mock import MockHost 6 from webkitpy.common.host_mock import MockHost
7 from webkitpy.common.system.executive_mock import MockExecutive2 7 from webkitpy.common.system.executive_mock import MockExecutive2
8 from webkitpy.w3c.chromium_commit import ChromiumCommit 8 from webkitpy.w3c.chromium_commit import ChromiumCommit
9 from webkitpy.w3c.test_exporter import CHROMIUM_WPT_DIR
10 from webkitpy.w3c.test_exporter_unittest import mock_command_exec 9 from webkitpy.w3c.test_exporter_unittest import mock_command_exec
11 10
11 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/imported/wpt/'
12
12 13
13 class ChromiumCommitTest(unittest.TestCase): 14 class ChromiumCommitTest(unittest.TestCase):
14 15
15 def test_accepts_sha(self): 16 def test_accepts_sha(self):
16 chromium_commit = ChromiumCommit(MockHost(), sha='deadbeefcafe') 17 chromium_commit = ChromiumCommit(MockHost(), sha='deadbeefcafe')
17 18
18 self.assertEqual(chromium_commit.sha, 'deadbeefcafe') 19 self.assertEqual(chromium_commit.sha, 'deadbeefcafe')
19 self.assertIsNone(chromium_commit.position) 20 self.assertIsNone(chromium_commit.position)
20 21
21 def test_derives_sha_from_position(self): 22 def test_derives_sha_from_position(self):
(...skipping 18 matching lines...) Expand all
40 41
41 position_footer = 'Cr-Commit-Position: refs/heads/master@{#789}' 42 position_footer = 'Cr-Commit-Position: refs/heads/master@{#789}'
42 chromium_commit = ChromiumCommit(host, position=position_footer) 43 chromium_commit = ChromiumCommit(host, position=position_footer)
43 44
44 files = chromium_commit.filtered_changed_files() 45 files = chromium_commit.filtered_changed_files()
45 46
46 expected_files = ['file1', 'file3'] 47 expected_files = ['file1', 'file3']
47 qualified_expected_files = [CHROMIUM_WPT_DIR + f for f in expected_files ] 48 qualified_expected_files = [CHROMIUM_WPT_DIR + f for f in expected_files ]
48 49
49 self.assertEqual(files, qualified_expected_files) 50 self.assertEqual(files, qualified_expected_files)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698