mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement Document.referrer
This commit is contained in:
parent
9e010a8aec
commit
d6c1f7b5e3
17 changed files with 55 additions and 32 deletions
|
@ -3,9 +3,6 @@
|
|||
[domain]
|
||||
expected: FAIL
|
||||
|
||||
[referrer]
|
||||
expected: FAIL
|
||||
|
||||
[readyState]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
[Document interface: attribute domain]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: attribute referrer]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: attribute dir]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -6990,9 +6987,6 @@
|
|||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "enableStyleSheetsForSet" with the proper type (33)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "referrer" with the proper type (36)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "dir" with the proper type (42)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -7350,9 +7344,6 @@
|
|||
[Document interface: new Document() must have own property "location"]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "referrer" with the proper type (36)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "dir" with the proper type (42)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -105,11 +105,10 @@ function ReferrerPolicyTestCase(scenario, testDescription, sanityChecker) {
|
|||
|
||||
// Check the reported URL.
|
||||
test.step(function() {
|
||||
// TODO - can uncomment when Document::Referrer is implemented
|
||||
// assert_equals(result.referrer,
|
||||
// t._expectedReferrerUrl,
|
||||
// "Reported Referrer URL is '" +
|
||||
// t._scenario.referrer_url + "'.");
|
||||
assert_equals(result.referrer,
|
||||
t._expectedReferrerUrl,
|
||||
"Reported Referrer URL is '" +
|
||||
t._scenario.referrer_url + "'.");
|
||||
assert_equals(result.headers.referer,
|
||||
t._expectedReferrerUrl,
|
||||
"Reported Referrer URL from HTTP header is '" +
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
return(false);
|
||||
}
|
||||
|
||||
var referrer = 'referrer' in document ? document.referrer : undefined;
|
||||
var referrer = document.referrer.length > 0 ? document.referrer : undefined;
|
||||
|
||||
var result = {
|
||||
location: document.location.toString(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue