summaryrefslogtreecommitdiffstats
path: root/browser/components/places/tests/unit/test_invalid_defaultLocation.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /browser/components/places/tests/unit/test_invalid_defaultLocation.js
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/places/tests/unit/test_invalid_defaultLocation.js')
-rw-r--r--browser/components/places/tests/unit/test_invalid_defaultLocation.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/browser/components/places/tests/unit/test_invalid_defaultLocation.js b/browser/components/places/tests/unit/test_invalid_defaultLocation.js
new file mode 100644
index 0000000000..cf653038aa
--- /dev/null
+++ b/browser/components/places/tests/unit/test_invalid_defaultLocation.js
@@ -0,0 +1,24 @@
+/* Any copyright is dedicated to the Public Domain.
+ * https://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+/**
+ * Test that if browser.bookmarks.defaultLocation contains an invalid GUID,
+ * PlacesUIUtils.defaultParentGuid will return a proper default value.
+ */
+
+add_task(async function() {
+ Services.prefs.setCharPref(
+ "browser.bookmarks.defaultLocation",
+ "useOtherBookmarks"
+ );
+
+ info(
+ "Checking that default parent guid was set back to the toolbar because of invalid preferable guid"
+ );
+ Assert.equal(
+ await PlacesUIUtils.defaultParentGuid,
+ PlacesUtils.bookmarks.toolbarGuid,
+ "Default parent guid is a toolbar guid"
+ );
+});