mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Bug 1302989: Make storage inspector work with file:// when # is in the URL
Issue #31
This commit is contained in:
parent
fab2253b26
commit
b95939dd3c
16 changed files with 271 additions and 84 deletions
|
|
@ -11,7 +11,7 @@ const {StorageFront} = require("devtools/shared/fronts/storage");
|
|||
Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtools/server/tests/browser/storage-helpers.js", this);
|
||||
|
||||
const TESTDATA = {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
{
|
||||
name: "name",
|
||||
value: "value1",
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtool
|
|||
|
||||
const beforeReload = {
|
||||
cookies: {
|
||||
"test1.example.org": ["c1", "cs2", "c3", "uc1"],
|
||||
"sectest1.example.org": ["uc1", "cs2"]
|
||||
"http://test1.example.org": ["c1", "cs2", "c3", "uc1"],
|
||||
"http://sectest1.example.org": ["uc1", "cs2"]
|
||||
},
|
||||
localStorage: {
|
||||
"http://test1.example.org": ["ls1", "ls2"],
|
||||
|
|
@ -99,7 +99,12 @@ function testAddIframe(front) {
|
|||
"https://sectest1.example.org": ["iframe-s-ss1"]
|
||||
},
|
||||
cookies: {
|
||||
"sectest1.example.org": [
|
||||
"https://sectest1.example.org": [
|
||||
getCookieId("cs2", ".example.org", "/"),
|
||||
getCookieId("sc1", "sectest1.example.org",
|
||||
"/browser/devtools/server/tests/browser/")
|
||||
],
|
||||
"http://sectest1.example.org": [
|
||||
getCookieId("sc1", "sectest1.example.org",
|
||||
"/browser/devtools/server/tests/browser/")
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtool
|
|||
|
||||
const storeMap = {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
{
|
||||
name: "c1",
|
||||
value: "foobar",
|
||||
|
|
@ -38,7 +38,29 @@ const storeMap = {
|
|||
isSecure: true,
|
||||
}
|
||||
],
|
||||
"sectest1.example.org": [
|
||||
|
||||
"http://sectest1.example.org": [
|
||||
{
|
||||
name: "cs2",
|
||||
value: "sessionCookie",
|
||||
path: "/",
|
||||
host: ".example.org",
|
||||
expires: 0,
|
||||
isDomain: true,
|
||||
isSecure: false,
|
||||
},
|
||||
{
|
||||
name: "sc1",
|
||||
value: "foobar",
|
||||
path: "/browser/devtools/server/tests/browser/",
|
||||
host: "sectest1.example.org",
|
||||
expires: 0,
|
||||
isDomain: false,
|
||||
isSecure: false,
|
||||
}
|
||||
],
|
||||
|
||||
"https://sectest1.example.org": [
|
||||
{
|
||||
name: "uc1",
|
||||
value: "foobar",
|
||||
|
|
@ -328,7 +350,7 @@ function* testStores(data) {
|
|||
}
|
||||
|
||||
function testCookies(cookiesActor) {
|
||||
is(Object.keys(cookiesActor.hosts).length, 2,
|
||||
is(Object.keys(cookiesActor.hosts).length, 3,
|
||||
"Correct number of host entries for cookies");
|
||||
return testCookiesObjects(0, cookiesActor.hosts, cookiesActor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
const {StorageFront} = require("devtools/shared/fronts/storage");
|
||||
const beforeReload = {
|
||||
cookies: ["test1.example.org", "sectest1.example.org"],
|
||||
cookies: ["http://test1.example.org", "https://sectest1.example.org"],
|
||||
localStorage: ["http://test1.example.org", "http://sectest1.example.org"],
|
||||
sessionStorage: ["http://test1.example.org", "http://sectest1.example.org"],
|
||||
};
|
||||
|
|
@ -27,7 +27,7 @@ const TESTS = [
|
|||
expected: {
|
||||
added: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c1", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
getCookieId("c2", "test1.example.org",
|
||||
|
|
@ -53,7 +53,7 @@ const TESTS = [
|
|||
expected: {
|
||||
changed: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c1", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
]
|
||||
|
|
@ -82,7 +82,7 @@ const TESTS = [
|
|||
expected: {
|
||||
deleted: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c2", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
]
|
||||
|
|
@ -123,7 +123,7 @@ const TESTS = [
|
|||
expected: {
|
||||
added: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c3", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
]
|
||||
|
|
@ -139,7 +139,7 @@ const TESTS = [
|
|||
},
|
||||
deleted: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c1", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
]
|
||||
|
|
@ -175,7 +175,7 @@ const TESTS = [
|
|||
expected: {
|
||||
deleted: {
|
||||
cookies: {
|
||||
"test1.example.org": [
|
||||
"http://test1.example.org": [
|
||||
getCookieId("c3", "test1.example.org",
|
||||
"/browser/devtools/server/tests/browser/"),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue