summaryrefslogtreecommitdiffstats
path: root/dom/cache/test/mochitest
diff options
context:
space:
mode:
Diffstat (limited to 'dom/cache/test/mochitest')
-rw-r--r--dom/cache/test/mochitest/driver.js8
-rw-r--r--dom/cache/test/mochitest/test_cache.js2
-rw-r--r--dom/cache/test/mochitest/test_cache_match_request.js2
-rw-r--r--dom/cache/test/mochitest/test_cache_orphaned_body.html12
-rw-r--r--dom/cache/test/mochitest/test_cache_orphaned_cache.html8
-rw-r--r--dom/cache/test/mochitest/test_cache_padding.html6
-rw-r--r--dom/cache/test/mochitest/test_cache_restart.html6
-rw-r--r--dom/cache/test/mochitest/test_cache_shrink.html8
-rw-r--r--dom/cache/test/mochitest/test_cache_tons_of_fd.html2
-rw-r--r--dom/cache/test/mochitest/test_cache_updateUsage.html6
-rw-r--r--dom/cache/test/mochitest/test_caches.js2
11 files changed, 31 insertions, 31 deletions
diff --git a/dom/cache/test/mochitest/driver.js b/dom/cache/test/mochitest/driver.js
index db0231c168..646135a70e 100644
--- a/dom/cache/test/mochitest/driver.js
+++ b/dom/cache/test/mochitest/driver.js
@@ -32,14 +32,14 @@ function runTests(testFile, order) {
// adapted from dom/indexedDB/test/helpers.js
function clearStorage() {
- var clearUnpartitionedStorage = new Promise(function (resolve, reject) {
+ var clearUnpartitionedStorage = new Promise(function (resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
var cb = SpecialPowers.wrapCallback(resolve);
request.callback = cb;
});
- var clearPartitionedStorage = new Promise(function (resolve, reject) {
+ var clearPartitionedStorage = new Promise(function (resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).partitionedPrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -77,7 +77,7 @@ function runTests(testFile, order) {
navigator.serviceWorker == null &&
SpecialPowers.getBoolPref("dom.cache.privateBrowsing.enabled")
) {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
resolve(true);
});
}
@@ -86,7 +86,7 @@ function runTests(testFile, order) {
}
function runFrameTest() {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
var iframe = document.createElement("iframe");
iframe.src = "frame.html";
iframe.onload = function () {
diff --git a/dom/cache/test/mochitest/test_cache.js b/dom/cache/test/mochitest/test_cache.js
index 7d6d01b34b..1bbe3304c5 100644
--- a/dom/cache/test/mochitest/test_cache.js
+++ b/dom/cache/test/mochitest/test_cache.js
@@ -67,7 +67,7 @@ caches
);
return snafu.put(req, res);
})
- .then(function (v) {
+ .then(function () {
return snafu;
});
})
diff --git a/dom/cache/test/mochitest/test_cache_match_request.js b/dom/cache/test/mochitest/test_cache_match_request.js
index f7a7001444..c6a96c0f2f 100644
--- a/dom/cache/test/mochitest/test_cache_match_request.js
+++ b/dom/cache/test/mochitest/test_cache_match_request.js
@@ -162,7 +162,7 @@ function testRequest(
.then(function () {
return caches
.match(request, { cacheName: name + "mambojambo" })
- .then(function (result) {
+ .then(function () {
is(
typeof r,
"undefined",
diff --git a/dom/cache/test/mochitest/test_cache_orphaned_body.html b/dom/cache/test/mochitest/test_cache_orphaned_body.html
index 98c0f42267..d540d90c9d 100644
--- a/dom/cache/test/mochitest/test_cache_orphaned_body.html
+++ b/dom/cache/test/mochitest/test_cache_orphaned_body.html
@@ -23,7 +23,7 @@ function setupTestIframe() {
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -33,7 +33,7 @@ function clearStorage() {
}
function storageUsage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var cb = SpecialPowers.wrapCallback(function(request) {
@@ -45,7 +45,7 @@ function storageUsage() {
}
function groupUsage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
navigator.storage.estimate().then(storageEstimation => {
resolve(storageEstimation.usage, 0);
});
@@ -53,7 +53,7 @@ function groupUsage() {
}
function workerGroupUsage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
function workerScript() {
navigator.storage.estimate().then(storageEstimation => {
postMessage(storageEstimation.usage);
@@ -71,7 +71,7 @@ function workerGroupUsage() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -81,7 +81,7 @@ function resetStorage() {
}
function gc() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
SpecialPowers.exactGC(resolve);
});
}
diff --git a/dom/cache/test/mochitest/test_cache_orphaned_cache.html b/dom/cache/test/mochitest/test_cache_orphaned_cache.html
index 7724a26fef..7d08fc3c55 100644
--- a/dom/cache/test/mochitest/test_cache_orphaned_cache.html
+++ b/dom/cache/test/mochitest/test_cache_orphaned_cache.html
@@ -23,7 +23,7 @@ function setupTestIframe() {
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -33,7 +33,7 @@ function clearStorage() {
}
function storageUsage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var cb = SpecialPowers.wrapCallback(function(request) {
@@ -45,7 +45,7 @@ function storageUsage() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -55,7 +55,7 @@ function resetStorage() {
}
function gc() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
SpecialPowers.exactGC(resolve);
});
}
diff --git a/dom/cache/test/mochitest/test_cache_padding.html b/dom/cache/test/mochitest/test_cache_padding.html
index 61b890e948..a912f47547 100644
--- a/dom/cache/test/mochitest/test_cache_padding.html
+++ b/dom/cache/test/mochitest/test_cache_padding.html
@@ -23,7 +23,7 @@ function setupTestIframe() {
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -33,7 +33,7 @@ function clearStorage() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -43,7 +43,7 @@ function resetStorage() {
}
function getStorageUsage(fromMemory) {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var cb = SpecialPowers.wrapCallback(function(request) {
diff --git a/dom/cache/test/mochitest/test_cache_restart.html b/dom/cache/test/mochitest/test_cache_restart.html
index bebb45c093..2472f7ab4e 100644
--- a/dom/cache/test/mochitest/test_cache_restart.html
+++ b/dom/cache/test/mochitest/test_cache_restart.html
@@ -22,7 +22,7 @@ function setupTestIframe() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -47,9 +47,9 @@ SpecialPowers.pushPrefEnv({
}).then(function() {
return resetStorage();
}).then(function() {
- return cache.match(url).then(function(resp) {
+ return cache.match(url).then(function() {
ok(false, "old cache reference should not work after reset");
- }).catch(function(err) {
+ }).catch(function() {
ok(true, "old cache reference should not work after reset");
});
}).then(function() {
diff --git a/dom/cache/test/mochitest/test_cache_shrink.html b/dom/cache/test/mochitest/test_cache_shrink.html
index 0d50f9e94b..def68ec770 100644
--- a/dom/cache/test/mochitest/test_cache_shrink.html
+++ b/dom/cache/test/mochitest/test_cache_shrink.html
@@ -23,7 +23,7 @@ function setupTestIframe() {
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -33,7 +33,7 @@ function clearStorage() {
}
function storageUsage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var cb = SpecialPowers.wrapCallback(function(request) {
@@ -45,7 +45,7 @@ function storageUsage() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -55,7 +55,7 @@ function resetStorage() {
}
function gc() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
SpecialPowers.exactGC(resolve);
});
}
diff --git a/dom/cache/test/mochitest/test_cache_tons_of_fd.html b/dom/cache/test/mochitest/test_cache_tons_of_fd.html
index c370201e50..00f896448c 100644
--- a/dom/cache/test/mochitest/test_cache_tons_of_fd.html
+++ b/dom/cache/test/mochitest/test_cache_tons_of_fd.html
@@ -23,7 +23,7 @@
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
diff --git a/dom/cache/test/mochitest/test_cache_updateUsage.html b/dom/cache/test/mochitest/test_cache_updateUsage.html
index f095886a1b..5feb70a89b 100644
--- a/dom/cache/test/mochitest/test_cache_updateUsage.html
+++ b/dom/cache/test/mochitest/test_cache_updateUsage.html
@@ -23,7 +23,7 @@ function setupTestIframe() {
}
function clearStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.clearStoragesForPrincipal(principal);
@@ -33,7 +33,7 @@ function clearStorage() {
}
function resetStorage() {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var request = qms.resetStoragesForPrincipal(principal);
@@ -43,7 +43,7 @@ function resetStorage() {
}
function getStorageUsage(fromMemory) {
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
var qms = SpecialPowers.Services.qms;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var cb = SpecialPowers.wrapCallback(function(request) {
diff --git a/dom/cache/test/mochitest/test_caches.js b/dom/cache/test/mochitest/test_caches.js
index c1d3abaff1..31a4238792 100644
--- a/dom/cache/test/mochitest/test_caches.js
+++ b/dom/cache/test/mochitest/test_caches.js
@@ -17,7 +17,7 @@ function testHas() {
ok(!has, name + " should not exist yet");
return caches.open(name);
})
- .then(function (c) {
+ .then(function () {
return caches.has(name);
})
.then(function (has) {