summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/queries
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/tests/queries')
-rw-r--r--toolkit/components/places/tests/queries/test_async.js2
-rw-r--r--toolkit/components/places/tests/queries/test_containersQueries_sorting.js4
-rw-r--r--toolkit/components/places/tests/queries/test_querySerialization.js46
-rw-r--r--toolkit/components/places/tests/queries/test_redirects.js4
-rw-r--r--toolkit/components/places/tests/queries/test_tags.js6
5 files changed, 31 insertions, 31 deletions
diff --git a/toolkit/components/places/tests/queries/test_async.js b/toolkit/components/places/tests/queries/test_async.js
index 8e895748ab..32a5c1a691 100644
--- a/toolkit/components/places/tests/queries/test_async.js
+++ b/toolkit/components/places/tests/queries/test_async.js
@@ -85,7 +85,7 @@ var tests = [
node.containerOpen = false;
},
- opened(node, newState, oldState) {
+ opened() {
do_throw("opened should not be called");
},
diff --git a/toolkit/components/places/tests/queries/test_containersQueries_sorting.js b/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
index 9cdc0f2a52..ff4bbe67bf 100644
--- a/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
+++ b/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
@@ -113,7 +113,7 @@ function cartProd(aSequences, aCallback) {
// For each sequence in aSequences, we maintain a pointer (an array index,
// really) to the element we're currently enumerating in that sequence
- var seqEltPtrs = aSequences.map(i => 0);
+ var seqEltPtrs = aSequences.map(() => 0);
var numProds = 0;
var done = false;
@@ -407,7 +407,7 @@ function check_children_sorting(aRootNode, aExpectedSortingMode) {
var comparator;
switch (aExpectedSortingMode) {
case Ci.nsINavHistoryQueryOptions.SORT_BY_NONE:
- comparator = function (a, b) {
+ comparator = function () {
return 0;
};
break;
diff --git a/toolkit/components/places/tests/queries/test_querySerialization.js b/toolkit/components/places/tests/queries/test_querySerialization.js
index 4c33854718..64a4c5a6e7 100644
--- a/toolkit/components/places/tests/queries/test_querySerialization.js
+++ b/toolkit/components/places/tests/queries/test_querySerialization.js
@@ -86,11 +86,11 @@ const querySwitches = [
desc: "nsINavHistoryQuery.hasBeginTime",
matches: flagSwitchMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.beginTime = Date.now() * 1000;
aQuery.beginTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_EPOCH;
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.beginTime = Date.now() * 1000;
aQuery.beginTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_TODAY;
},
@@ -103,11 +103,11 @@ const querySwitches = [
desc: "nsINavHistoryQuery.hasEndTime",
matches: flagSwitchMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.endTime = Date.now() * 1000;
aQuery.endTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_EPOCH;
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.endTime = Date.now() * 1000;
aQuery.endTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_TODAY;
},
@@ -120,10 +120,10 @@ const querySwitches = [
desc: "nsINavHistoryQuery.hasSearchTerms",
matches: flagSwitchMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.searchTerms = "shrimp and white wine";
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.searchTerms = "";
},
],
@@ -135,15 +135,15 @@ const querySwitches = [
desc: "nsINavHistoryQuery.hasDomain",
matches: flagSwitchMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.domain = "mozilla.com";
aQuery.domainIsHost = false;
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.domain = "www.mozilla.com";
aQuery.domainIsHost = true;
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.domain = "";
},
],
@@ -155,7 +155,7 @@ const querySwitches = [
desc: "nsINavHistoryQuery.hasUri",
matches: flagSwitchMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.uri = uri("http://mozilla.com");
},
],
@@ -167,7 +167,7 @@ const querySwitches = [
desc: "nsINavHistoryQuery.minVisits",
matches: simplePropertyMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.minVisits = 0x7fffffff; // 2^31 - 1
},
],
@@ -178,7 +178,7 @@ const querySwitches = [
desc: "nsINavHistoryQuery.maxVisits",
matches: simplePropertyMatches,
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.maxVisits = 0x7fffffff; // 2^31 - 1
},
],
@@ -205,13 +205,13 @@ const querySwitches = [
return true;
},
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setParents([]);
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setParents([PlacesUtils.bookmarks.rootGuid]);
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setParents([
PlacesUtils.bookmarks.rootGuid,
PlacesUtils.bookmarks.tagsGuid,
@@ -244,13 +244,13 @@ const querySwitches = [
return true;
},
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.tags = [];
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.tags = [""];
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.tags = [
"foo",
"七難",
@@ -263,7 +263,7 @@ const querySwitches = [
"あいうえお",
];
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.tags = [
"foo",
"七難",
@@ -301,13 +301,13 @@ const querySwitches = [
return true;
},
runs: [
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setTransitions([]);
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setTransitions([Ci.nsINavHistoryService.TRANSITION_DOWNLOAD]);
},
- function (aQuery, aQueryOptions) {
+ function (aQuery) {
aQuery.setTransitions([
Ci.nsINavHistoryService.TRANSITION_TYPED,
Ci.nsINavHistoryService.TRANSITION_BOOKMARK,
@@ -455,7 +455,7 @@ function cartProd(aSequences, aCallback) {
// For each sequence in aSequences, we maintain a pointer (an array index,
// really) to the element we're currently enumerating in that sequence
- var seqEltPtrs = aSequences.map(i => 0);
+ var seqEltPtrs = aSequences.map(() => 0);
var numProds = 0;
var done = false;
diff --git a/toolkit/components/places/tests/queries/test_redirects.js b/toolkit/components/places/tests/queries/test_redirects.js
index b0e7c9b421..6b122e3180 100644
--- a/toolkit/components/places/tests/queries/test_redirects.js
+++ b/toolkit/components/places/tests/queries/test_redirects.js
@@ -42,7 +42,7 @@ function check_results_callback(aSequence) {
}
// Build expectedData array.
- let expectedData = visits.filter(function (aVisit, aIndex, aArray) {
+ let expectedData = visits.filter(function (aVisit) {
// Embed visits never appear in results.
if (aVisit.transType == Ci.nsINavHistoryService.TRANSITION_EMBED) {
return false;
@@ -154,7 +154,7 @@ function cartProd(aSequences, aCallback) {
// For each sequence in aSequences, we maintain a pointer (an array index,
// really) to the element we're currently enumerating in that sequence
- let seqEltPtrs = aSequences.map(i => 0);
+ let seqEltPtrs = aSequences.map(() => 0);
let numProds = 0;
let done = false;
diff --git a/toolkit/components/places/tests/queries/test_tags.js b/toolkit/components/places/tests/queries/test_tags.js
index 17ad3478ce..23a332f20b 100644
--- a/toolkit/components/places/tests/queries/test_tags.js
+++ b/toolkit/components/places/tests/queries/test_tags.js
@@ -190,7 +190,7 @@ add_task(async function many_tags_no_bookmark() {
"Querying on many tags associated with a URI and tags not associated " +
"with that URI should not return that URI"
);
- await task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
+ await task_doWithBookmark(["foo", "bar", "baz"], function () {
var [query, opts] = makeQuery(["foo", "bogus"]);
executeAndCheckQueryResults(query, opts, []);
[query, opts] = makeQuery(["foo", "bar", "bogus"]);
@@ -202,7 +202,7 @@ add_task(async function many_tags_no_bookmark() {
add_task(async function nonexistent_tags() {
info("Querying on nonexistent tag should return no results");
- await task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
+ await task_doWithBookmark(["foo", "bar", "baz"], function () {
var [query, opts] = makeQuery(["bogus"]);
executeAndCheckQueryResults(query, opts, []);
[query, opts] = makeQuery(["bogus", "gnarly"]);
@@ -449,7 +449,7 @@ function addBookmark(aURI) {
/**
* Asynchronous task that removes all pages from history and bookmarks.
*/
-async function task_cleanDatabase(aCallback) {
+async function task_cleanDatabase() {
await PlacesUtils.bookmarks.eraseEverything();
await PlacesUtils.history.clear();
}