Auto merge of #26006 - tipowol:fix-25680, r=Manishearth

Add missing same-origin referrer policy

<!-- Please describe your changes on the following line: -->

These changes add missing same-origin ReferrerPolicy in Request.webidl.

---
<!-- 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 #25680 (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-03-20 17:00:55 -04:00 committed by GitHub
commit 5ce2fd0882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 10 deletions

View file

@ -848,6 +848,7 @@ impl Into<MsgReferrerPolicy> for ReferrerPolicy {
ReferrerPolicy::Origin => MsgReferrerPolicy::Origin,
ReferrerPolicy::Origin_when_cross_origin => MsgReferrerPolicy::OriginWhenCrossOrigin,
ReferrerPolicy::Unsafe_url => MsgReferrerPolicy::UnsafeUrl,
ReferrerPolicy::Same_origin => MsgReferrerPolicy::SameOrigin,
ReferrerPolicy::Strict_origin => MsgReferrerPolicy::StrictOrigin,
ReferrerPolicy::Strict_origin_when_cross_origin => {
MsgReferrerPolicy::StrictOriginWhenCrossOrigin
@ -864,9 +865,9 @@ impl Into<ReferrerPolicy> for MsgReferrerPolicy {
ReferrerPolicy::No_referrer_when_downgrade
},
MsgReferrerPolicy::Origin => ReferrerPolicy::Origin,
MsgReferrerPolicy::SameOrigin => ReferrerPolicy::Origin,
MsgReferrerPolicy::OriginWhenCrossOrigin => ReferrerPolicy::Origin_when_cross_origin,
MsgReferrerPolicy::UnsafeUrl => ReferrerPolicy::Unsafe_url,
MsgReferrerPolicy::SameOrigin => ReferrerPolicy::Same_origin,
MsgReferrerPolicy::StrictOrigin => ReferrerPolicy::Strict_origin,
MsgReferrerPolicy::StrictOriginWhenCrossOrigin => {
ReferrerPolicy::Strict_origin_when_cross_origin

View file

@ -95,6 +95,7 @@ enum ReferrerPolicy {
"origin",
"origin-when-cross-origin",
"unsafe-url",
"same-origin",
"strict-origin",
"strict-origin-when-cross-origin"
};

View file

@ -65,9 +65,6 @@
[Cross origin redirection, empty redirect header, no-referrer-when-downgrade init ]
expected: FAIL
[Cross origin redirection, empty redirect header, same-origin init ]
expected: FAIL
[Cross origin redirection, empty redirect header, origin init ]
expected: FAIL
@ -151,9 +148,6 @@
[Cross origin redirection, empty redirect header, no-referrer-when-downgrade init ]
expected: FAIL
[Cross origin redirection, empty redirect header, same-origin init ]
expected: FAIL
[Cross origin redirection, empty redirect header, origin init ]
expected: FAIL

View file

@ -3,6 +3,3 @@
[Check referrerPolicy init value of and associated getter]
expected: FAIL
[Check referrerPolicy init value of same-origin and associated getter]
expected: FAIL