Commit b8c6519a authored by qyearsley's avatar qyearsley Committed by Commit bot

Simplify manifest-related code in Port to only support new format.

BUG=678077

Review-Url: https://codereview.chromium.org/2624333004
Cr-Commit-Position: refs/heads/master@{#443441}
parent d2966799
...@@ -728,13 +728,9 @@ class Port(object): ...@@ -728,13 +728,9 @@ class Port(object):
path_in_wpt = match.group(1) path_in_wpt = match.group(1)
manifest_items = self._manifest_items_for_path(path_in_wpt) manifest_items = self._manifest_items_for_path(path_in_wpt)
assert manifest_items is not None assert manifest_items is not None
# For most testharness tests, manifest_items looks like:
# [["/some/test/path.html", {}]]
if len(manifest_items) != 1: if len(manifest_items) != 1:
continue continue
# TODO(qyearsley): Simplify this after http://crbug.com/678077 is resolved. url = manifest_items[0][0]
item = manifest_items[0]
url = item['url'] if 'url' in item else item[0]
if url[1:] != path_in_wpt: if url[1:] != path_in_wpt:
# TODO(tkent): foo.any.js and bar.worker.js should be accessed # TODO(tkent): foo.any.js and bar.worker.js should be accessed
# as foo.any.html, foo.any.worker, and bar.worker with WPTServe. # as foo.any.html, foo.any.worker, and bar.worker with WPTServe.
...@@ -754,12 +750,11 @@ class Port(object): ...@@ -754,12 +750,11 @@ class Port(object):
https://github.com/w3c/wpt-tools/blob/master/manifest/item.py https://github.com/w3c/wpt-tools/blob/master/manifest/item.py
and is assumed to be a list of the format [url, extras], and is assumed to be a list of the format [url, extras],
or [url, references, extras] for reftests, or None if not found. 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", {}]]
""" """
# TODO(qyearsley): Simplify this after http://crbug.com/678077 is resolved. items = self._wpt_manifest()['items']
if 'local_changes' in self._wpt_manifest():
items = self._wpt_manifest()['local_changes']['items']
else:
items = self._wpt_manifest()['items']
if path_in_wpt in items['manual']: if path_in_wpt in items['manual']:
return items['manual'][path_in_wpt] return items['manual'][path_in_wpt]
elif path_in_wpt in items['reftest']: elif path_in_wpt in items['reftest']:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment