1
0
Fork 0
firefox/toolkit/components/places/tests/unit/test_PlacesUtils_isRootItem.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

21 lines
449 B
JavaScript

"use strict";
const GUIDS = [
PlacesUtils.bookmarks.rootGuid,
...PlacesUtils.bookmarks.userContentRoots,
PlacesUtils.bookmarks.tagsGuid,
];
add_task(async function test_isRootItem() {
for (let guid of GUIDS) {
Assert.ok(
PlacesUtils.isRootItem(guid),
`Should correctly identify root item ${guid}`
);
}
Assert.ok(
!PlacesUtils.isRootItem("fakeguid1234"),
"Should not identify other items as root."
);
});