summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js')
-rw-r--r--toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js b/toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
index 1b4ea87ec0..b2d82e65b0 100644
--- a/toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
+++ b/toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
@@ -53,6 +53,17 @@ let gTests = [
Services.prefs.setBoolPref("places.history.enabled", true);
},
},
+ {
+ desc: "Visit URL with login info",
+ href: "http://user:pass@example.com/with_login_info",
+ loadType: PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
+ async setup() {
+ await PlacesTestUtils.addVisits({
+ uri: this.href,
+ transition: TRANSITION_TYPED,
+ });
+ },
+ },
];
add_task(async function () {
@@ -67,6 +78,7 @@ add_task(async function () {
for (let test of gTests) {
info(test.desc);
let pageURI = PlacesUtils.toURI(test.href);
+ let exposableURI = Services.io.createExposableURI(pageURI);
await test.setup();
@@ -75,7 +87,7 @@ add_task(async function () {
"favicon-changed",
events =>
events.some(e => {
- if (e.url == pageURI.spec && e.faviconUrl == faviconURI.spec) {
+ if (e.url == exposableURI.spec && e.faviconUrl == faviconURI.spec) {
pageGuid = e.pageGuid;
return true;
}
@@ -97,7 +109,7 @@ add_task(async function () {
Assert.equal(
pageGuid,
await PlacesTestUtils.getDatabaseValue("moz_places", "guid", {
- url: pageURI,
+ url: exposableURI,
}),
"Page guid is correct"
);