-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Test current Realm (still to be defined in more detail) #1381
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/3147 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
@bzbarsky this is what we discussed yesterday I think. It seems browsers are actually fairly consistent apart from that one thing in Chrome. Perhaps @inexorabletash has some insight into that. (Also curious, Safari throws a |
@annevk Thanks for writing up this test! Some other things I suspect are worth checking:
|
@bzbarsky it seems https://dump.testsuite.org/wpt/current-realm-promises.html tests an asynchronous crypto method and |
|
@bzbarsky fair, added. Seems to behave as the other methods in Chrome. Fails in Firefox of course. |
@annevk Try testing with the "layout.css.font-loading-api.enabled" preference set to true in Firefox. |
@bzbarsky same as other methods with that enabled. |
3c191aa
to
77e08b2
Compare
Rebased and squashed this. @bzbarsky, should we commit this? I don't really remember the context anymore and whether Web IDL covers this already or not. |
@annevk The context is that IDL requires specs to define which global their objects are associated with but specs by and large don't do that. UA behavior is not terribly consistent in practice on some of the more interesting cases. So we need to get several things to happen:
The PR here is for item #2 of that, right? |
It is, but I also remember having a proposal for how 1 could be largely solved by IDL except for a few cases. I think that's why we ended up writing these tests, but unfortunately I didn't link from this PR to that discussion. |
Item 1 (God, I wish github didn't mangle '#' for me) can mostly be solved by saying that the associated global of an object created via a DOM API call is the associated global of the "this" value, I think. Trying to recall what the exceptions to that would be.... Or were we talking about using the callee function Realm except for some exceptions? |
A DOM API call being a call going through IDL? Anyway, I don't remember what exactly it was we thought we should do here. Just that I wanted IDL to handle it and you wanted to see tests first. |
Well, I wanted to see what browsers do right now, so we could evaluate what the handling in IDL should look like. |
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24652 is the corresponding specification bug for this set of tests. |
To add to the list from #1381 (comment):
|
Please explain what you did here @ayg. |
@annevk I accidentally did git push --mirror to the w3c repo instead of mine, due to incorrect .git/config (since fixed), and didn't have any idea how to fix it. I e-mailed @jgraham and @Ms2ger because they were the people I thought of off the top of my head, but if you know how to fix it, please do. |
No 😟 |
|
Create a test based on http://web.mit.edu/bzbarsky/www/testcases/global-object-association/createImageData.html to see what the global object is for various things.
Going to land this per discussion with @jgraham on IRC (#whatwg). |
Create a test based on http://web.mit.edu/bzbarsky/www/testcases/global-object-association/createImageData.html to see what the global object is for various things.