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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2644783003: Regenerate MANIFEST.json when WPT tests are run (Closed)
Patch Set: wip - work on what we discussed in the bug 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
index cfb9b06c59f6ea6141a4c48265e7fb8031803ca6..c70f70b508dff40f9268c0b2b0927e0c222d7e82 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -751,6 +751,26 @@ class Port(object):
manifest_path = self._filesystem.join(self.layout_tests_dir(), 'external', 'wpt', 'MANIFEST.json')
return WPTManifest(self._filesystem.read_text_file(manifest_path))
+ def _manifest_items_for_path(self, path_in_wpt):
+ """Returns a manifest item for the given WPT path, or None if not found.
+
+ The format of a manifest item depends on
+ https://github.com/w3c/wpt-tools/blob/master/manifest/item.py
+ and is assumed to be a list of the format [url, extras],
+ or [url, references, extras] for reftests, or None if not found.
+
+ For most testharness tests, the returned manifest_items is expected
+ to look like this:: [["/some/test/path.html", {}]]
+ """
+ items = self._wpt_manifest()['items']
+ if path_in_wpt in items['manual']:
+ return items['manual'][path_in_wpt]
+ elif path_in_wpt in items['reftest']:
+ return items['reftest'][path_in_wpt]
+ elif path_in_wpt in items['testharness']:
+ return items['testharness'][path_in_wpt]
+ return None
jeffcarp 2017/02/21 19:33:16 This isn't part of my CL, not sure how it got in h
qyearsley 2017/02/21 22:47:57 This part was changed in https://codereview.chromi
+
def is_slow_wpt_test(self, test_file):
match = re.match(r'external/wpt/(.*)', test_file)
if not match:

Powered by Google App Engine
This is Rietveld 408576698