net: correct handling of the empty string referrer policy when provided in requestInit (#34518)

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-12-07 16:35:11 +11:00 committed by GitHub
parent 68a27946bf
commit 651326dacb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View file

@ -801,7 +801,7 @@ impl From<NetTraitsRequestMode> for RequestMode {
impl From<ReferrerPolicy> for MsgReferrerPolicy {
fn from(policy: ReferrerPolicy) -> Self {
match policy {
ReferrerPolicy::_empty => MsgReferrerPolicy::default(),
ReferrerPolicy::_empty => MsgReferrerPolicy::EmptyString,
ReferrerPolicy::No_referrer => MsgReferrerPolicy::NoReferrer,
ReferrerPolicy::No_referrer_when_downgrade => {
MsgReferrerPolicy::NoReferrerWhenDowngrade

View file

@ -1,3 +0,0 @@
[request-init-001.sub.html]
[Check referrerPolicy init value of and associated getter]
expected: FAIL