mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-09 18:09:16 +00:00
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
add_task(function* setup() {
|
|
yield setupPlacesDatabase("places_v24.sqlite");
|
|
});
|
|
|
|
add_task(function* database_is_valid() {
|
|
Assert.equal(PlacesUtils.history.databaseStatus,
|
|
PlacesUtils.history.DATABASE_STATUS_UPGRADED);
|
|
|
|
let db = yield PlacesUtils.promiseDBConnection();
|
|
Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
|
|
});
|
|
|
|
add_task(function test_bookmark_guid_annotation_removed()
|
|
{
|
|
yield PlacesUtils.bookmarks.eraseEverything();
|
|
|
|
let db = yield PlacesUtils.promiseDBConnection();
|
|
let m = new Map([
|
|
[PlacesUtils.placesRootId, PlacesUtils.bookmarks.rootGuid],
|
|
[PlacesUtils.bookmarksMenuFolderId, PlacesUtils.bookmarks.menuGuid],
|
|
[PlacesUtils.toolbarFolderId, PlacesUtils.bookmarks.toolbarGuid],
|
|
[PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.bookmarks.unfiledGuid],
|
|
[PlacesUtils.tagsFolderId, PlacesUtils.bookmarks.tagsGuid]
|
|
]);
|
|
|
|
let rows = yield db.execute(`SELECT id, guid FROM moz_bookmarks`);
|
|
for (let row of rows) {
|
|
let id = row.getResultByName("id");
|
|
let guid = row.getResultByName("guid");
|
|
Assert.equal(m.get(id), guid, "The root folder has the correct GUID");
|
|
}
|
|
});
|