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 80fe591f846d834dc0ae41483ce1cf52befe7a28..0e6bf50a170bdd1f7e06b958e57d4b86216770c0 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 |
@@ -744,6 +744,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): |
foolip
2017/02/16 07:20:26
Looks like this is unused now?
|
+ """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 |
+ |
def is_slow_wpt_test(self, test_file): |
match = re.match(r'external/wpt/(.*)', test_file) |
if not match: |