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

Unified 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, 10 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..a1681f199ef486e58cef087b14a9a1cbfe5b3e99
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest_unittest.py
@@ -0,0 +1,57 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.w3c.wpt_manifest import WPTManifest
+
+
+class WPTManifestUnitTest(unittest.TestCase):
+
+ def test_ensure_manifest_copies_new_manifest(self):
+ host = MockHost()
+ manifest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json'
+
+ self.assertFalse(host.filesystem.exists(manifest_path))
+ WPTManifest.ensure_manifest(host)
+ self.assertTrue(host.filesystem.exists(manifest_path))
+
+ webkit_base = '/mock-checkout/third_party/WebKit'
+ self.assertEqual(
+ host.executive.calls,
+ [
+ [
+ 'python',
+ webkit_base + '/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest',
+ '--work',
+ '--tests-root',
+ webkit_base + '/LayoutTests/external/wpt',
+ ]
+ ]
+ )
+
+ def test_ensure_manifest_updates_manifest_if_it_exists(self):
+ host = MockHost()
+ manifest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json'
+
+ host.filesystem.write_binary_file(manifest_path, '{}')
+ self.assertTrue(host.filesystem.exists(manifest_path))
+
+ WPTManifest.ensure_manifest(host)
+ self.assertTrue(host.filesystem.exists(manifest_path))
+
+ webkit_base = '/mock-checkout/third_party/WebKit'
+ self.assertEqual(
+ host.executive.calls,
+ [
+ [
+ 'python',
+ webkit_base + '/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest',
+ '--work',
+ '--tests-root',
+ webkit_base + '/LayoutTests/external/wpt',
+ ]
+ ]
+ )
« 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