summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/tests')
-rw-r--r--devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js2
-rw-r--r--devtools/server/tests/browser/browser_storage_dynamic_windows.js11
-rw-r--r--devtools/server/tests/browser/browser_storage_listings.js28
-rw-r--r--devtools/server/tests/browser/browser_storage_updates.js14
4 files changed, 41 insertions, 14 deletions
diff --git a/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js b/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js
index c1cf0aa72..1cdc8b490 100644
--- a/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js
+++ b/devtools/server/tests/browser/browser_storage_cookies-duplicate-names.js
@@ -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",
diff --git a/devtools/server/tests/browser/browser_storage_dynamic_windows.js b/devtools/server/tests/browser/browser_storage_dynamic_windows.js
index 91b4155d9..a8f791f15 100644
--- a/devtools/server/tests/browser/browser_storage_dynamic_windows.js
+++ b/devtools/server/tests/browser/browser_storage_dynamic_windows.js
@@ -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/")
]
diff --git a/devtools/server/tests/browser/browser_storage_listings.js b/devtools/server/tests/browser/browser_storage_listings.js
index e47a320b8..6c1668321 100644
--- a/devtools/server/tests/browser/browser_storage_listings.js
+++ b/devtools/server/tests/browser/browser_storage_listings.js
@@ -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);
}
diff --git a/devtools/server/tests/browser/browser_storage_updates.js b/devtools/server/tests/browser/browser_storage_updates.js
index 01a35cefc..4a1604787 100644
--- a/devtools/server/tests/browser/browser_storage_updates.js
+++ b/devtools/server/tests/browser/browser_storage_updates.js
@@ -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/"),
]