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: Test image loads inside srcdoc frames. #3700
Conversation
This patch teaches the 'img-tag'-style tests to load an image both in the top-level document, and inside a 'srcdoc' frame. The referrer should be the same in both places. Addresses #2851.
Reviewers for this pull request are: @kristijanburnik. |
@bzbarsky: Are you happy with this? If so, I'll merge it. |
Yes, this seems reasonable in general. For dynamic referrer policy changes (e.g. dynamic meta tag insertion?), it would be nice to test the situation in which the srcdoc iframe is created and loaded before the dynamic mutation happens. But we can push that off into a separate issue; it seems like a good bit of work to do. |
@mikewest ping -- is this ready to merge? It addresses w3c/webappsec-referrer-policy#57. |
Thanks for the ping, Emily! |
…licies This commit modifies the img-tag referrer policy tests to test a srcdoc iframe with its own referrer policy set via <meta> tag, adding on to the existing tests for srcdoc iframes that inherit the referrer policy of their parent document. The corresponding HTML change is whatwg/html#1871. This also corrects a bug in web-platform-tests#3700, which was comparing undefined to undefined (using the 'referrer' property of image data, when it should be headers.referer).
This commit modifies the img-tag referrer policy tests to test a srcdoc iframe with its own referrer policy set via <meta> tag, adding on to the existing tests for srcdoc iframes that inherit the referrer policy of their parent document. The corresponding HTML change is whatwg/html#1871. This also corrects a bug in #3700, which was comparing undefined to undefined (using the 'referrer' property of image data, when it should be headers.referer).
This patch teaches the 'img-tag'-style tests to load an image both
in the top-level document, and inside a 'srcdoc' frame. The referrer
should be the same in both places.
Addresses #2851.