Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Add variant support to // META #185

Closed
annevk opened this issue Mar 15, 2017 · 4 comments
Closed

Add variant support to // META #185

annevk opened this issue Mar 15, 2017 · 4 comments
Labels

Comments

@annevk
Copy link
Member

annevk commented Mar 15, 2017

This blocks landing web-platform-tests/wpt#5148 / fixing web-platform-tests/wpt#2557 properly.

@jdm
Copy link
Contributor

jdm commented Mar 21, 2017

Somehow we need to interact with

@cached_property
def variant_nodes(self):
"""List of ElementTree Elements corresponding to nodes representing a
test variant"""
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='variant']")
@cached_property
def test_variants(self):
rv = []
for element in self.variant_nodes:
if "content" in element.attrib:
variant = element.attrib["content"]
assert variant == "" or variant[0] in ["#", "?"]
rv.append(variant)
if not rv:
rv = [""]
return rv
.

@annevk
Copy link
Member Author

annevk commented Mar 21, 2017

Since it ends up writing out a container HTML for the worker resource as well, I suppose we can plug in the meta elements there.

@jgraham was also talking about combining the HTML wrapper .any.js tests so you only have a single file in which case this would just work (though not for .worker.js I suppose).

@jgraham
Copy link
Member

jgraham commented Mar 21, 2017

Writing the meta stuff in the wrapper document doesn't work because that doesn't exist until runtime and this needs to go in the manifest so it knows which tests exist. You need to make the changes in manifest/sourcefile.py so that variant is a supported meta value and each variant is added as a different test in the manifest.

@wpt-issue-mover
Copy link
Collaborator

This issue has been moved to web-platform-tests/wpt#7210; please continue all discussion there.

@w3c w3c locked and limited conversation to collaborators Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants