| Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py
|
| index 1c5c9d266e1ea7881c83787b9d5c02caa709d002..58e3e9aef58b6daa42ddf3c7c8bf875e6a8bd6c1 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py
|
| @@ -8,6 +8,7 @@ from webkitpy.common.host_mock import MockHost
|
| from webkitpy.common.system.executive_mock import MockExecutive
|
| from webkitpy.common.system.filesystem_mock import MockFileSystem
|
| from webkitpy.w3c.local_wpt import LocalWPT
|
| +from webkitpy.w3c.common_unittest import mock_command_exec_strict
|
|
|
|
|
| class LocalWPTTest(unittest.TestCase):
|
| @@ -39,7 +40,6 @@ class LocalWPTTest(unittest.TestCase):
|
| self.assertEqual(host.executive.calls[0][1], 'clone')
|
|
|
| def test_constructor(self):
|
| - #
|
| host = MockHost()
|
| LocalWPT(host)
|
| self.assertEqual(len(host.executive.calls), 0)
|
| @@ -53,19 +53,18 @@ class LocalWPTTest(unittest.TestCase):
|
|
|
| def test_last_wpt_exported_commit(self):
|
| host = MockHost()
|
| - return_vals = [
|
| - 'deadbeefcafe',
|
| - '123',
|
| - '9ea4fc353a4b1c11c6e524270b11baa4d1ddfde8',
|
| - ]
|
| - host.executive = MockExecutive(run_command_fn=lambda _: return_vals.pop())
|
| + host.executive = mock_command_exec_strict({
|
| + 'rev-list': '9ea4fc353a4b1c11c6e524270b11baa4d1ddfde8',
|
| + 'footers': 'Cr-Commit-Position: 123',
|
| + 'crrev-parse': 'add087a97844f4b9e307d9a216940582d96db306',
|
| + })
|
| host.filesystem = MockFileSystem()
|
| local_wpt = LocalWPT(host)
|
|
|
| wpt_sha, chromium_commit = local_wpt.most_recent_chromium_commit()
|
| self.assertEqual(wpt_sha, '9ea4fc353a4b1c11c6e524270b11baa4d1ddfde8')
|
| self.assertEqual(chromium_commit.position, '123')
|
| - self.assertEqual(chromium_commit.sha, 'deadbeefcafe')
|
| + self.assertEqual(chromium_commit.sha, 'add087a97844f4b9e307d9a216940582d96db306')
|
|
|
| def test_last_wpt_exported_commit_not_found(self):
|
| host = MockHost()
|
|
|