Skip to content
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

Merged
merged 2 commits into from Jan 21, 2020

Conversation

annevk
Copy link
Member

@annevk annevk commented Jan 17, 2020

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.

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.
Copy link
Member

@mikewest mikewest left a 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 => {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

@annevk
Copy link
Member Author

annevk commented Jan 20, 2020

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).

@annevk annevk merged commit da44ef2 into master Jan 21, 2020
@annevk annevk deleted the annevk/referrer-policy-inheritance branch January 21, 2020 09:40
@annevk
Copy link
Member Author

annevk commented Jan 21, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants