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

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

Issue 2439153002: Script for exporting WPT (Closed)
Patch Set: Add more cases to check for in local/remote WPT branches Created 4 years, 1 month 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
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import unittest
6 from webkitpy.w3c.sync import TestExporter
7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.common.system.executive_mock import MockExecutive2
9 from webkitpy.common.system.filesystem_mock import MockFileSystem
10
11
12 class TestExporterTest(unittest.TestCase):
13
14 def test_pulls_if_wpt_exists(self):
15 host = MockHost()
16 host.executive = MockExecutive2()
17 host.filesystem = MockFileSystem(files={
18 '/mock-checkout/third_party/WebKit/wpt': ''
19 })
20 exporter = TestExporter(host, options={})
21 exporter.pull_down_local_wpt()
22 self.assertEqual(len(host.executive.calls), 1)
23 self.assertEqual(host.executive.calls[0][1], 'pull')
24
25 def test_clones_if_wpt_does_not_exist(self):
26 host = MockHost()
27 host.executive = MockExecutive2()
28 host.filesystem = MockFileSystem(files={
29 })
30 exporter = TestExporter(host, options={})
31 exporter.pull_down_local_wpt()
32 print host.executive.calls
33 self.assertEqual(len(host.executive.calls), 1)
34 self.assertEqual(host.executive.calls[0][1], 'clone')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698