-
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
COEP tests where iframe fails to load #21300
Comments
Would replacing Arthur made the following script yesterday and we saw the difference in behavior between FF and CR:
|
No, you need to wait for a timeout. And it would be better not to do anything with load as per the specification it's not expected to be dispatched at this point. (Adding a comment pointing to the whatwg/html issue might be good though, so we can clean this up once that gets resolved.) |
Indeed onerror is not always called! thanks. I have a prototype that I think works:
onload is kept here, supposing that we accept both a load or an error for the frame, which allows for the completion of test even if COEP was mishandled. |
I'd rather only use load if we expect it to not result in a network error. And the precedent in other tests is to use |
@ParisMeuleman @ArthurSonzogni
html/cross-origin-embedder-policy/require-corp-about-blank.html
and equivalent tests rely on theiframe
element firing a load event when there's a network error. There's currently no agreement on that being the right thing: whatwg/html#125 (there's various issues around this).We need to fix these tests to not rely on that until there's agreement on that behavior.
Also, when you use
promise_test
you do needt.step_func
wrappers for any event handling as otherwise exceptions fired as part of those events end up failing the test harness as is happening in Firefox. That's problematic. Documentation on this was wrong, but is now corrected at https://web-platform-tests.org/writing-tests/testharness-api.html#promise-tests.The text was updated successfully, but these errors were encountered: