| Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py
|
| index 20fd78e95d0ca610e65321d6f5347196b99bc79d..2304b45261302ca0648d435fd4ba1cb97539becf 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py
|
| @@ -6,6 +6,8 @@ import unittest
|
| from webkitpy.common.host_mock import MockHost
|
| from webkitpy.common.system.executive_mock import MockExecutive2
|
| from webkitpy.w3c.chromium_commit import ChromiumCommit
|
| +from webkitpy.w3c.test_exporter import CHROMIUM_WPT_DIR
|
| +from webkitpy.w3c.test_exporter_unittest import mock_command_exec
|
|
|
|
|
| class ChromiumCommitTest(unittest.TestCase):
|
| @@ -24,3 +26,24 @@ class ChromiumCommitTest(unittest.TestCase):
|
|
|
| self.assertEqual(chromium_commit.position, 'refs/heads/master@{#789}')
|
| self.assertEqual(chromium_commit.sha, 'deadbeefcafe')
|
| +
|
| + def test_filtered_changed_files_blacklist(self):
|
| + host = MockHost()
|
| +
|
| + fake_files = ['file1', 'MANIFEST.json', 'file3']
|
| + qualified_fake_files = [CHROMIUM_WPT_DIR + f for f in fake_files]
|
| +
|
| + host.executive = mock_command_exec({
|
| + 'diff-tree': '\n'.join(qualified_fake_files),
|
| + 'crrev-parse': 'fake rev',
|
| + })
|
| +
|
| + position_footer = 'Cr-Commit-Position: refs/heads/master@{#789}'
|
| + chromium_commit = ChromiumCommit(host, position=position_footer)
|
| +
|
| + files = chromium_commit.filtered_changed_files()
|
| +
|
| + expected_files = ['file1', 'file3']
|
| + qualified_expected_files = [CHROMIUM_WPT_DIR + f for f in expected_files]
|
| +
|
| + self.assertEqual(files, qualified_expected_files)
|
|
|