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

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

Issue 2722243005: Ensure manifest exists in Port._wpt_manifest. (Closed)
Patch Set: Call ensure manifest in rebaseline-cl Created 3 years, 9 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 | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 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
7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.w3c.wpt_manifest import WPTManifest
9
10
11 class WPTManifestUnitTest(unittest.TestCase):
12
13 def test_ensure_manifest_copies_new_manifest(self):
14 host = MockHost()
15 manifest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/ wpt/MANIFEST.json'
16
17 self.assertFalse(host.filesystem.exists(manifest_path))
18 WPTManifest.ensure_manifest(host)
19 self.assertTrue(host.filesystem.exists(manifest_path))
20
21 webkit_base = '/mock-checkout/third_party/WebKit'
22 self.assertEqual(
23 host.executive.calls,
24 [
25 [
26 'python',
27 webkit_base + '/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/ma nifest',
28 '--work',
29 '--tests-root',
30 webkit_base + '/LayoutTests/external/wpt',
31 ]
32 ]
33 )
34
35 def test_ensure_manifest_updates_manifest_if_it_exists(self):
36 host = MockHost()
37 manifest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/ wpt/MANIFEST.json'
38
39 host.filesystem.write_binary_file(manifest_path, '{}')
40 self.assertTrue(host.filesystem.exists(manifest_path))
41
42 WPTManifest.ensure_manifest(host)
43 self.assertTrue(host.filesystem.exists(manifest_path))
44
45 webkit_base = '/mock-checkout/third_party/WebKit'
46 self.assertEqual(
47 host.executive.calls,
48 [
49 [
50 'python',
51 webkit_base + '/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/ma nifest',
52 '--work',
53 '--tests-root',
54 webkit_base + '/LayoutTests/external/wpt',
55 ]
56 ]
57 )
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698