зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1770944 - Fixed all test_permmanager_migrate.js tests, r=smaug
Depends on D192626 Differential Revision: https://phabricator.services.mozilla.com/D192796
This commit is contained in:
Родитель
084ba6524e
Коммит
bc1e858518
|
@ -106,7 +106,7 @@ add_task(async function test() {
|
|||
["https://foo.com", "storageAccessAPI^https://foo.com", 2, 0, 0, 0],
|
||||
["http://foo.com", "storageAccessAPI^https://bar.com", 2, 0, 0, 0],
|
||||
["http://foo.com", "storageAccessAPI^https://bar.com", 2, 0, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
];
|
||||
|
||||
let found = expected.map(it => 0);
|
||||
|
|
|
@ -144,7 +144,6 @@ add_task(async function test() {
|
|||
// The http:// entries under foo.com won't be inserted, as there are history entries for foo.com,
|
||||
// and http://foo.com or a subdomain are never visited.
|
||||
// ["http://foo.com", "A", 1, 0, 0],
|
||||
// ["http://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
//
|
||||
// Because we search for port/scheme combinations under eTLD+1, we should not have http:// entries
|
||||
// for subdomains of foo.com either
|
||||
|
@ -153,15 +152,14 @@ add_task(async function test() {
|
|||
|
||||
["https://foo.com", "A", 1, 0, 0],
|
||||
["https://foo.com", "C", 1, 0, 0],
|
||||
["https://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://sub.foo.com", "B", 1, 0, 0],
|
||||
["https://subber.sub.foo.com", "B", 1, 0, 0],
|
||||
|
||||
// bar.ca will have both http:// and https:// for all entries, because there are no associated history entries
|
||||
["http://bar.ca", "B", 1, 0, 0],
|
||||
["https://bar.ca", "B", 1, 0, 0],
|
||||
["http://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["http://bar.ca", "A", 1, 0, 0],
|
||||
["https://bar.ca", "A", 1, 0, 0],
|
||||
["file:///some/path/to/file.html", "A", 1, 0, 0],
|
||||
["file:///another/file.html", "A", 1, 0, 0],
|
||||
|
||||
|
@ -169,7 +167,6 @@ add_task(async function test() {
|
|||
// also have these entries
|
||||
["ftp://foo.com:8000", "A", 1, 0, 0],
|
||||
["ftp://foo.com:8000", "C", 1, 0, 0],
|
||||
["ftp://foo.com:8000^inBrowser=1", "A", 1, 0, 0],
|
||||
|
||||
// In addition, because we search for port/scheme combinations under eTLD+1, we should have the
|
||||
// following entries
|
||||
|
|
|
@ -178,21 +178,19 @@ add_task(function test() {
|
|||
let expected = [
|
||||
["http://foo.com", "A", 1, 0, 0],
|
||||
["http://foo.com", "C", 1, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
["http://sub.foo.com", "B", 1, 0, 0],
|
||||
["http://subber.sub.foo.com", "B", 1, 0, 0],
|
||||
|
||||
["https://foo.com", "A", 1, 0, 0],
|
||||
["https://foo.com", "C", 1, 0, 0],
|
||||
["https://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://sub.foo.com", "B", 1, 0, 0],
|
||||
["https://subber.sub.foo.com", "B", 1, 0, 0],
|
||||
|
||||
// bar.ca will have both http:// and https:// for all entries, because there are no associated history entries
|
||||
["http://bar.ca", "B", 1, 0, 0],
|
||||
["https://bar.ca", "B", 1, 0, 0],
|
||||
["http://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["http://bar.ca", "A", 1, 0, 0],
|
||||
["https://bar.ca", "A", 1, 0, 0],
|
||||
["file:///some/path/to/file.html", "A", 1, 0, 0],
|
||||
["file:///another/file.html", "A", 1, 0, 0],
|
||||
|
||||
|
|
|
@ -211,7 +211,6 @@ add_task(async function test() {
|
|||
// The http:// entries under foo.com won't be inserted, as there are history entries for foo.com,
|
||||
// and http://foo.com or a subdomain are never visited.
|
||||
// ["http://foo.com", "A", 1, 0, 0],
|
||||
// ["http://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
//
|
||||
// Because we search for port/scheme combinations under eTLD+1, we should not have http:// entries
|
||||
// for subdomains of foo.com either
|
||||
|
@ -220,15 +219,14 @@ add_task(async function test() {
|
|||
|
||||
["https://foo.com", "A", 1, 0, 0],
|
||||
["https://foo.com", "C", 1, 0, 0],
|
||||
["https://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://sub.foo.com", "B", 1, 0, 0],
|
||||
["https://subber.sub.foo.com", "B", 1, 0, 0],
|
||||
|
||||
// bar.ca will have both http:// and https:// for all entries, because there are no associated history entries
|
||||
["http://bar.ca", "B", 1, 0, 0],
|
||||
["https://bar.ca", "B", 1, 0, 0],
|
||||
["http://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["http://bar.ca", "A", 1, 0, 0],
|
||||
["https://bar.ca", "A", 1, 0, 0],
|
||||
["file:///some/path/to/file.html", "A", 1, 0, 0],
|
||||
["file:///another/file.html", "A", 1, 0, 0],
|
||||
|
||||
|
@ -236,7 +234,6 @@ add_task(async function test() {
|
|||
// also have these entries
|
||||
["ftp://foo.com:8000", "A", 1, 0, 0],
|
||||
["ftp://foo.com:8000", "C", 1, 0, 0],
|
||||
["ftp://foo.com:8000^inBrowser=1", "A", 1, 0, 0],
|
||||
|
||||
// In addition, because we search for port/scheme combinations under eTLD+1, we should have the
|
||||
// following entries
|
||||
|
|
|
@ -102,7 +102,6 @@ add_task(function test() {
|
|||
let expected = [
|
||||
["https://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 2, 0, 0, 0],
|
||||
|
||||
["http://127.0.0.1", "B", 2, 0, 0, 0],
|
||||
["http://localhost", "B", 2, 0, 0, 0],
|
||||
|
|
|
@ -212,7 +212,6 @@ add_task(async function test() {
|
|||
// The http:// entries under foo.com won't be inserted, as there are history entries for foo.com,
|
||||
// and http://foo.com or a subdomain are never visited.
|
||||
// ["http://foo.com", "A", 1, 0, 0],
|
||||
// ["http://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
//
|
||||
// Because we search for port/scheme combinations under eTLD+1, we should not have http:// entries
|
||||
// for subdomains of foo.com either
|
||||
|
@ -221,15 +220,14 @@ add_task(async function test() {
|
|||
|
||||
["https://foo.com", "A", 1, 0, 0],
|
||||
["https://foo.com", "C", 1, 0, 0],
|
||||
["https://foo.com^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://sub.foo.com", "B", 1, 0, 0],
|
||||
["https://subber.sub.foo.com", "B", 1, 0, 0],
|
||||
|
||||
// bar.ca will have both http:// and https:// for all entries, because there are no associated history entries
|
||||
["http://bar.ca", "B", 1, 0, 0],
|
||||
["https://bar.ca", "B", 1, 0, 0],
|
||||
["http://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["https://bar.ca^inBrowser=1", "A", 1, 0, 0],
|
||||
["http://bar.ca", "A", 1, 0, 0],
|
||||
["https://bar.ca", "A", 1, 0, 0],
|
||||
["file:///some/path/to/file.html", "A", 1, 0, 0],
|
||||
["file:///another/file.html", "A", 1, 0, 0],
|
||||
|
||||
|
@ -237,7 +235,6 @@ add_task(async function test() {
|
|||
// also have these entries
|
||||
["ftp://foo.com:8000", "A", 1, 0, 0],
|
||||
["ftp://foo.com:8000", "C", 1, 0, 0],
|
||||
["ftp://foo.com:8000^inBrowser=1", "A", 1, 0, 0],
|
||||
|
||||
// In addition, because we search for port/scheme combinations under eTLD+1, we should have the
|
||||
// following entries
|
||||
|
|
|
@ -101,7 +101,6 @@ add_task(function test() {
|
|||
let expected = [
|
||||
["https://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 2, 0, 0, 0],
|
||||
];
|
||||
|
||||
let found = expected.map(it => 0);
|
||||
|
|
|
@ -164,7 +164,7 @@ add_task(async function test() {
|
|||
let created7 = [
|
||||
insertOrigin("https://foo.com", "A", 2, 0, 0, 0),
|
||||
insertOrigin("http://foo.com", "A", 2, 0, 0, 0),
|
||||
insertOrigin("http://foo.com^inBrowser=1", "A", 2, 0, 0, 0),
|
||||
insertOrigin("http://foo.com^inBrowser=1", "C", 2, 0, 0, 0),
|
||||
insertOrigin("https://192.0.2.235", "A", 2, 0, 0),
|
||||
];
|
||||
|
||||
|
@ -174,7 +174,7 @@ add_task(async function test() {
|
|||
insertHost("foo.com", "A", 1, 0, 0, 0, 0, false),
|
||||
insertHost("foo.com", "C", 1, 0, 0, 0, 0, false),
|
||||
insertHost("foo.com", "A", 1, 0, 0, 0, 1000, false),
|
||||
insertHost("foo.com", "A", 1, 0, 0, 0, 2000, true),
|
||||
insertHost("foo.com", "C", 1, 0, 0, 0, 2000, true),
|
||||
insertHost("sub.foo.com", "B", 1, 0, 0, 0, 0, false),
|
||||
insertHost("subber.sub.foo.com", "B", 1, 0, 0, 0, 0, false),
|
||||
insertHost("bar.ca", "B", 1, 0, 0, 0, 0, false),
|
||||
|
@ -224,7 +224,7 @@ add_task(async function test() {
|
|||
// We should have kept the previously migrated entries
|
||||
["https://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "C", 2, 0, 0, 0],
|
||||
|
||||
// Make sure that we also support localhost, and IP addresses
|
||||
["https://localhost:8080", "A", 1, 0, 0],
|
||||
|
|
|
@ -172,7 +172,7 @@ add_task(async function test() {
|
|||
let expected = [
|
||||
["https://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
["http://foo.com^inBrowser=1", "A", 2, 0, 0, 0],
|
||||
["http://foo.com", "A", 2, 0, 0, 0],
|
||||
];
|
||||
|
||||
let found = expected.map(it => 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче