зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1640135 - P5: update tests; r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D77918
This commit is contained in:
Родитель
01f8cce7e1
Коммит
bc5fda4e76
|
@ -55,6 +55,7 @@ add_task(async function test_deserialize_principal_with_csp() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -69,6 +70,7 @@ add_task(async function test_deserialize_principal_with_csp() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
// Within Bug 965637 we removed CSP from Principals. Already serialized Principals however should still deserialize correctly (just without the CSP).
|
||||
// "cspJSON": "{\"csp-policies\":[{\"child-src\":[\"https://www.googletagmanager.com\",\"https://www.google-analytics.com\",\"https://www.youtube-nocookie.com\",\"https://trackertest.org\",\"https://www.surveygizmo.com\",\"https://accounts.firefox.com\",\"https://accounts.firefox.com.cn\",\"https://www.youtube.com\"],\"connect-src\":[\"'self'\",\"https://*.mozilla.net\",\"https://*.mozilla.org\",\"https://*.mozilla.com\",\"https://www.googletagmanager.com\",\"https://www.google-analytics.com\",\"https://accounts.firefox.com/\",\"https://accounts.firefox.com.cn/\"],\"default-src\":[\"'self'\",\"https://*.mozilla.net\",\"https://*.mozilla.org\",\"https://*.mozilla.com\"],\"frame-src\":[\"https://www.googletagmanager.com\",\"https://www.google-analytics.com\",\"https://www.youtube-nocookie.com\",\"https://trackertest.org\",\"https://www.surveygizmo.com\",\"https://accounts.firefox.com\",\"https://accounts.firefox.com.cn\",\"https://www.youtube.com\"],\"img-src\":[\"'self'\",\"https://*.mozilla.net\",\"https://*.mozilla.org\",\"https://*.mozilla.com\",\"data:\",\"https://mozilla.org\",\"https://www.googletagmanager.com\",\"https://www.google-analytics.com\",\"https://adservice.google.com\",\"https://adservice.google.de\",\"https://adservice.google.dk\",\"https://creativecommons.org\",\"https://ad.doubleclick.net\"],\"report-only\":false,\"script-src\":[\"'self'\",\"https://*.mozilla.net\",\"https://*.mozilla.org\",\"https://*.mozilla.com\",\"'unsafe-inline'\",\"'unsafe-eval'\",\"https://www.googletagmanager.com\",\"https://www.google-analytics.com\",\"https://tagmanager.google.com\",\"https://www.youtube.com\",\"https://s.ytimg.com\"],\"style-src\":[\"'self'\",\"https://*.mozilla.net\",\"https://*.mozilla.org\",\"https://*.mozilla.com\",\"'unsafe-inline'\"]}]}",
|
||||
|
|
|
@ -80,6 +80,7 @@ add_task(async function test_realHistoryCheck() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -95,6 +96,7 @@ add_task(async function test_realHistoryCheck() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -108,6 +110,7 @@ add_task(async function test_realHistoryCheck() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -122,6 +125,7 @@ add_task(async function test_realHistoryCheck() {
|
|||
privateBrowsingId: 0,
|
||||
userContextId: 0,
|
||||
geckoViewSessionContextId: "",
|
||||
partitionKey: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -16,10 +16,10 @@ const HAS_FIRST_PARTY_DOMAIN = [
|
|||
const OUTER_ORIGIN = "http://mochi.test:8888";
|
||||
const FIRST_PARTY_DOMAIN = escape("(http,mochi.test)");
|
||||
const INNER_ORIGIN = HAS_FIRST_PARTY_DOMAIN
|
||||
? `http://example.com^firstPartyDomain=${FIRST_PARTY_DOMAIN}`
|
||||
? `http://example.com^partitionKey=${FIRST_PARTY_DOMAIN}`
|
||||
: "http://example.com";
|
||||
const SECURE_INNER_ORIGIN = HAS_FIRST_PARTY_DOMAIN
|
||||
? `https://example.com^firstPartyDomain=${FIRST_PARTY_DOMAIN}`
|
||||
? `https://example.com^partitionKey=${FIRST_PARTY_DOMAIN}`
|
||||
: "https://example.com";
|
||||
|
||||
const OUTER_VALUE = "outer-value-" + RAND;
|
||||
|
|
|
@ -62,7 +62,7 @@ add_task(async function() {
|
|||
const tests = [
|
||||
{
|
||||
prefValue: true,
|
||||
originAttributes: { firstPartyDomain: "(http,example.org)" },
|
||||
originAttributes: { partitionKey: "(http,example.org)" },
|
||||
},
|
||||
{
|
||||
prefValue: false,
|
||||
|
|
|
@ -69,14 +69,13 @@ this.DynamicFPIHelper = {
|
|||
ifr.onload = async _ => {
|
||||
await SpecialPowers.spawn(ifr, [], async _ => {
|
||||
is(
|
||||
content.document.nodePrincipal.originAttributes
|
||||
.firstPartyDomain,
|
||||
content.document.nodePrincipal.originAttributes.partitionKey,
|
||||
"",
|
||||
"We don't have first-party set on nodePrincipal"
|
||||
);
|
||||
is(
|
||||
content.document.effectiveStoragePrincipal.originAttributes
|
||||
.firstPartyDomain,
|
||||
.partitionKey,
|
||||
"(http,example.net)",
|
||||
"We have first-party set on storagePrincipal"
|
||||
);
|
||||
|
|
|
@ -71,14 +71,13 @@ this.StoragePrincipalHelper = {
|
|||
ifr.onload = async _ => {
|
||||
await SpecialPowers.spawn(ifr, [], async _ => {
|
||||
is(
|
||||
content.document.nodePrincipal.originAttributes
|
||||
.firstPartyDomain,
|
||||
content.document.nodePrincipal.originAttributes.partitionKey,
|
||||
"",
|
||||
"We don't have first-party set on nodePrincipal"
|
||||
);
|
||||
is(
|
||||
content.document.effectiveStoragePrincipal.originAttributes
|
||||
.firstPartyDomain,
|
||||
.partitionKey,
|
||||
"(http,example.net)",
|
||||
"We have first-party set on storagePrincipal"
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче