mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1265941 - Rename the ReferrerPolicy "origin-only" enum value to "origin". r=jdm, a=ritu
This commit is contained in:
parent
e8951b4f5b
commit
245d24c50e
2
dom/cache/DBSchema.cpp
vendored
2
dom/cache/DBSchema.cpp
vendored
@ -193,7 +193,7 @@ static_assert(int(HeadersGuardEnum::None) == 0 &&
|
||||
static_assert(int(ReferrerPolicy::_empty) == 0 &&
|
||||
int(ReferrerPolicy::No_referrer) == 1 &&
|
||||
int(ReferrerPolicy::No_referrer_when_downgrade) == 2 &&
|
||||
int(ReferrerPolicy::Origin_only) == 3 &&
|
||||
int(ReferrerPolicy::Origin) == 3 &&
|
||||
int(ReferrerPolicy::Origin_when_cross_origin) == 4 &&
|
||||
int(ReferrerPolicy::Unsafe_url) == 5 &&
|
||||
int(ReferrerPolicy::EndGuard_) == 6,
|
||||
|
@ -277,7 +277,7 @@ FetchDriver::HttpFetch()
|
||||
case ReferrerPolicy::No_referrer_when_downgrade:
|
||||
net_referrerPolicy = net::RP_No_Referrer_When_Downgrade;
|
||||
break;
|
||||
case ReferrerPolicy::Origin_only:
|
||||
case ReferrerPolicy::Origin:
|
||||
net_referrerPolicy = net::RP_Origin;
|
||||
break;
|
||||
case ReferrerPolicy::Origin_when_cross_origin:
|
||||
|
@ -62,4 +62,4 @@ enum RequestMode { "same-origin", "no-cors", "cors", "navigate" };
|
||||
enum RequestCredentials { "omit", "same-origin", "include" };
|
||||
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache" };
|
||||
enum RequestRedirect { "follow", "error", "manual" };
|
||||
enum ReferrerPolicy { "", "no-referrer", "no-referrer-when-downgrade", "origin-only", "origin-when-cross-origin", "unsafe-url" };
|
||||
enum ReferrerPolicy { "", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url" };
|
||||
|
@ -1090,7 +1090,7 @@ public:
|
||||
mReferrerPolicy = ReferrerPolicy::No_referrer;
|
||||
break;
|
||||
case nsIHttpChannel::REFERRER_POLICY_ORIGIN:
|
||||
mReferrerPolicy = ReferrerPolicy::Origin_only;
|
||||
mReferrerPolicy = ReferrerPolicy::Origin;
|
||||
break;
|
||||
case nsIHttpChannel::REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE:
|
||||
mReferrerPolicy = ReferrerPolicy::No_referrer_when_downgrade;
|
||||
|
@ -114,27 +114,27 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
|
||||
'ReferrerPolicy: no-referrer-when-downgrade',
|
||||
'Service Worker should respond to fetch with no referrer with ""');
|
||||
return frame.contentWindow.fetch('resources/simple.html?referrerFull',
|
||||
{referrerPolicy: "origin-only", referrer: referrer});
|
||||
{referrerPolicy: "origin", referrer: referrer});
|
||||
})
|
||||
.then(function(response) { return response.text(); })
|
||||
.then(function(response_text) {
|
||||
assert_equals(
|
||||
response_text,
|
||||
'Referrer: ' + origin + '\n' +
|
||||
'ReferrerPolicy: origin-only',
|
||||
'Service Worker should respond to fetch with the referrer origin with "origin-only" and a same origin request');
|
||||
'ReferrerPolicy: origin',
|
||||
'Service Worker should respond to fetch with the referrer origin with "origin" and a same origin request');
|
||||
var http_url = get_host_info()['HTTP_ORIGIN'] + base_path() +
|
||||
'/resources/simple.html?referrerFull';
|
||||
return frame.contentWindow.fetch(http_url,
|
||||
{referrerPolicy: "origin-only", referrer: referrer});
|
||||
{referrerPolicy: "origin", referrer: referrer});
|
||||
})
|
||||
.then(function(response) { return response.text(); })
|
||||
.then(function(response_text) {
|
||||
assert_equals(
|
||||
response_text,
|
||||
'Referrer: ' + origin + '\n' +
|
||||
'ReferrerPolicy: origin-only',
|
||||
'Service Worker should respond to fetch with the referrer origin with "origin-only" and a cross origin request');
|
||||
'ReferrerPolicy: origin',
|
||||
'Service Worker should respond to fetch with the referrer origin with "origin" and a cross origin request');
|
||||
return frame.contentWindow.fetch('resources/simple.html?referrerFull',
|
||||
{referrerPolicy: "origin-when-cross-origin", referrer: referrer});
|
||||
})
|
||||
|
@ -29,14 +29,14 @@
|
||||
var referrerPolicies = {"givenValues" : [ "",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin-only",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"unsafe-url"
|
||||
],
|
||||
"expectedValues" : ["",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin-only",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"unsafe-url"
|
||||
]
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
var initValuesDict = {"method" : "POST",
|
||||
"referrer" : "http://{{host}}:{{ports[http][0]}}/",
|
||||
"referrerPolicy" : "origin-only",
|
||||
"referrerPolicy" : "origin",
|
||||
"mode" : "same-origin",
|
||||
"credentials" : "include",
|
||||
"cache" : "no-cache",
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
var expectedInitialized = {"method" : "POST",
|
||||
"referrer" : "http://{{host}}:{{ports[http][0]}}/",
|
||||
"referrerPolicy" : "origin-only",
|
||||
"referrerPolicy" : "origin",
|
||||
"mode" : "same-origin",
|
||||
"credentials" : "include",
|
||||
"cache" : "no-cache",
|
||||
|
Loading…
Reference in New Issue
Block a user