Make Location operate on the correct objects

This PR updates the implementation of the "Location-object navigate"
algorithm to use the correct browsing context as the source browsing
context for navigation. This affects the determination of a referrer and
referrer policy and the treatment of javascript: URLs.

This PR also fixes the derivation of a Location object's relevant
Document to match the specified behavior.
This commit is contained in:
yvt 2021-08-21 00:26:05 +09:00 committed by Martin Robinson
parent 918557ad6d
commit b0a99c8c67
11 changed files with 270 additions and 223 deletions

View file

@ -2,9 +2,6 @@
[cross-origin, setting src]
expected: FAIL
[cross-origin, setting location.href]
expected: FAIL
[cross-origin-domain but same-origin, setting src]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location-assign.html]
[Fetch client and URL resolution for location.assign()]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location-href.html]
[Fetch client and URL resolution for location.href setter]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location.html]
[Fetch client and URL resolution for location setter]
expected: FAIL

View file

@ -2,9 +2,6 @@
[cross-origin, setting src]
expected: FAIL
[cross-origin, setting location.href]
expected: FAIL
[cross-origin-domain but same-origin, setting src]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location-assign.html]
[Fetch client and URL resolution for location.assign()]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location-href.html]
[Fetch client and URL resolution for location.href setter]
expected: FAIL

View file

@ -1,3 +0,0 @@
[context-for-location.html]
[Fetch client and URL resolution for location setter]
expected: FAIL

View file

@ -1,5 +0,0 @@
[navigate-child-function-parent.html]
type: testharness
[Set location from a parent]
expected: FAIL

View file

@ -1,18 +1,3 @@
[no-browsing-context.window.html]
[Setting `protocol` to `http` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `hash` to `test` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Invoking `replace` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Getting `ancestorOrigins` of a `Location` object sans browsing context should be [\]]
expected: FAIL
[Invoking `assign` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `href` to `http://test:test/` of a `Location` object sans browsing context is a no-op]
expected: FAIL