mirror of
https://github.com/servo/servo.git
synced 2025-09-06 13:08:21 +01:00
Auto merge of #12416 - canaltinova:referrer, r=jdm
Implement Document.referrer <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12389 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12416) <!-- Reviewable:end -->
This commit is contained in:
commit
4b78b9adab
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
|
||||
|
||||
|
@ -6987,9 +6984,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
|
||||
|
||||
|
@ -7347,9 +7341,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