HTML: Snapshot timing of iframe referrerpolicy for location.ancestorOrigins#56675
HTML: Snapshot timing of iframe referrerpolicy for location.ancestorOrigins#56675
Conversation
...owsers/history/the-location-interface/location-ancestor-origins-referrerpolicy-snapshot.html
Show resolved
Hide resolved
...owsers/history/the-location-interface/location-ancestor-origins-referrerpolicy-snapshot.html
Show resolved
Hide resolved
| document.body.append(iframe); | ||
| // The referrerpolicy attribute was snapshotted when the initial about:blank doc was created | ||
| // https://html.spec.whatwg.org/#the-iframe-element:create-a-new-child-navigable | ||
| // https://html.spec.whatwg.org/#child-navigables:creating-a-new-browsing-context |
There was a problem hiding this comment.
How about we change these links to http://html.spec.whatwg.org/multipage/nav-history-apis.html#the-location-interface:attr-iframe-referrerpolicy, which is what https://whatpr.org/html/11560/90c74b7...cef3330/nav-history-apis.html#the-location-interface:attr-iframe-referrerpolicy is now, and what the real link will be when the PR lands?
I think that's more accurate.
| assert_array_equals(Array.from(iframe.contentWindow.location.ancestorOrigins), ['null']); | ||
| iframe.referrerPolicy = ''; | ||
| await loaded; | ||
| // The referrerpolicy attribute was snapshotted again when the response becomes available |
There was a problem hiding this comment.
This part I don't think is true, but I'l continue the discussion in the HTML PR thread.
|
This test will be synced upstream from firefox repo. Comments in the test may change a bit to reflect what the intention is better, but the test itself gives the (now) expected results. Maybe @domfarolino could take a quick look when you have time? It's basically just changing results from [null], [window.origin], to [null] and [null], because we're expecting the snap shot to happen at the moment in time when it's done for normal navigation's, therefore this race should not be seen. |
| // https://html.spec.whatwg.org/#populating-a-session-history-entry:loading-a-document | ||
| // https://html.spec.whatwg.org/#populating-a-session-history-entry:navigate-html | ||
| // https://html.spec.whatwg.org/#read-html:initialise-the-document-object | ||
| assert_array_equals(Array.from(iframe.contentWindow.location.ancestorOrigins), [window.origin]); |
There was a problem hiding this comment.
I'm confused about this. In #56675 (comment) you say:
but the test itself gives the (now) expected results. [...] It's basically just changing results from [null], [window.origin], to [null] and [null]
But I still see ['null'] above, and [window.origin] here.
There was a problem hiding this comment.
As previously stated, the fixed test will be upstreamed from the repo
I don't have write access to overwrite what @zcorpan did.
...owsers/history/the-location-interface/location-ancestor-origins-referrerpolicy-snapshot.html
Show resolved
Hide resolved
|
Closing, see #56966 |
See whatwg/html#11560