summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js')
-rw-r--r--browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js b/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js
index 05e3a230f1..7164ae8911 100644
--- a/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js
+++ b/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js
@@ -893,8 +893,11 @@ add_autofill_task(async function bookmarkBelowThreshold() {
await cleanup();
});
-// Bookmarked places should be autofilled when they *do* meet the threshold.
+// Bookmarked places should be autofilled also when they meet the threshold.
add_autofill_task(async function bookmarkAboveThreshold() {
+ // Add a visit to the URL, otherwise origin frecency will be too small, note
+ // it would be filled anyway as bookmarks are always filled.
+ await PlacesTestUtils.addVisits(["http://" + url]);
// Bookmark a URL.
await PlacesTestUtils.addBookmarkWithDetails({
uri: "http://" + url,
@@ -957,13 +960,10 @@ add_autofill_task(async function zeroThreshold() {
);
Assert.equal(placeFrecency, -1);
- // Make sure the origin's frecency is 0.
let originFrecency = await getOriginFrecency("http://", host);
- Assert.equal(originFrecency, 0);
-
- // Make sure the autofill threshold is 0.
+ Assert.equal(originFrecency, 1, "Check expected origin's frecency");
let threshold = await getOriginAutofillThreshold();
- Assert.equal(threshold, 0);
+ Assert.equal(threshold, 1, "Check expected origins threshold");
let context = createContext(search, { isPrivate: false });
await check_results({