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
Referrer Policy: inheritance with javascript: URLs and document.write() #21232
Conversation
This cleans up some existing tests and adds new tests with results I expect from reading the specification, but do not see confirmed in implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look right to me. I wonder if they pass in browsers? Let's find out. :)
One style nit, otherwise LGTM.
].forEach(({ srcDocPolicy, expected }) => { | ||
promise_test(t => { | ||
return new Promise(resolve => { | ||
window.addEventListener("message", t.step_func(msg => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need step_func
in a promise_test
, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what https://web-platform-tests.org/writing-tests/testharness-api.html#promise-tests suggests, but if I remove the wrappers I end up with a harness failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a mistake in the documentation, #21269 fixed it.
Both Chrome and Firefox have (different) failures in iframe-inheritance-javascript.html and iframe-inheritance-javascript-child.html. Firefox also fails iframe-inheritance-document-write.html. The test is assuming that the policy of the document the URL executes in is the one supposed to be reused (i.e., the target not the source). |
This cleans up some existing tests and adds new tests with results I expect from reading the specification, but do not see confirmed in implementations.