-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running WPT #78
Comments
No, not yet. Right now, I'm using wpt-runner to run the tests on Node with jsdom, but that has it limits. For example: for #20, I want to take the browser's built-in streams implementation and polyfill only the newer (not yet natively implemented) features. Or perhaps I find that a browser doesn't yet implement a spec change, and I may want to monkey-patch certain properties and methods ahead of browser updates. To test this, I need a way to run WPT in actual browsers with the polyfill loaded. It seems that Would it be better if I opened an issue over at web-platform-tests/wpt? |
Sure, feel free to open an issue at https://github.com/web-platform-tests/wpt/issues. I would explore one of these things:
All of these require local modification. If you want something that can be run with |
I would have preferred an out-of-the-box solution, but I can understand that if that doesn't exist yet, it'd be risky to already commit to something without knowing if it would actually solve my problem. So sure, I'll start by hacking the WPT files locally first. 😛 Thanks for the help! |
Right, I'm guessing you might discover some new problems by just hacking it together which are worth knowing about early. For example, if you need to inject your polyfill at a very specific time, that might affect the shape of a solution. |
All right, I got something working. 😛
@@ -81,6 +81,7 @@
query = "?" + query
meta = "\n".join(self._get_meta(request))
script = "\n".join(self._get_script(request))
+ script = self._script_replacement("script", "/web-streams-polyfill/polyfill.es2018.js") + script
response.content = self.wrapper % {"meta": meta, "script": script, "path": path, "query": query}
wrap_pipeline(path, request, response)
cd test/web-platforms-tests/
python ./wpt run chrome "streams/readable-streams/tee.any.html" --binary "C:\Program Files\Google\Chrome\Application\chrome.exe" --yes --headless --no-pause-after-test That runs the tests for I can change this to Right now, I'm managing this with some custom filters. If I understand the documentation for |
@foolip Sorry to bother you. Do you happen to know of any example usages of |
I'm afraid I don't know how to use that, it's not used in Chromium AFAIK. I think it's used by Gecko however and @jgraham might know how to invoke it. |
So, I think no one uses the wpt command reguarly, gecko uses the functionality but with a different frontend. But assuming your setup is pretty standard, |
Not having much luck... 😕
I generated streams.log.json with:
I'm on web-platform-tests/wpt@07a56dc. Am I doing something wrong, or should I open an issue? 😅 |
You might need to define |
@jgraham Sorry for not getting back to you sooner. I can confirm that adding a dummy Would you accept a PR for this in upstream WPT? I don't think it'd hurt to copy a generic |
@MattiasBuelens I would be very happy to see a PR for that against WPT. I'm not sure what the correct fix is, but I've never gotten the expectations stuff to work with |
I decided not to use Thanks for your assistance anyway! 🙂 |
Hi @MattiasBuelens!
You asked in #testing on IRC:
Did you figure out how to do this?
The text was updated successfully, but these errors were encountered: