1
0
Fork 0
firefox/browser/components/places/tests/unit/test_invalid_defaultLocation.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
677 B
JavaScript

/* 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"
);
});