diff options
Diffstat (limited to 'browser/components/migration/tests/unit/test_Chrome_bookmarks.js')
-rw-r--r-- | browser/components/migration/tests/unit/test_Chrome_bookmarks.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/browser/components/migration/tests/unit/test_Chrome_bookmarks.js b/browser/components/migration/tests/unit/test_Chrome_bookmarks.js index d115cda412..3c09869800 100644 --- a/browser/components/migration/tests/unit/test_Chrome_bookmarks.js +++ b/browser/components/migration/tests/unit/test_Chrome_bookmarks.js @@ -71,11 +71,13 @@ async function testBookmarks(migratorKey, subDirs) { ).path; await IOUtils.copy(sourcePath, target.path); - // Get page url for each favicon - let faviconURIs = await MigrationUtils.getRowsFromDBWithoutLocks( + // Get page url and the image data for each favicon + let favicons = await MigrationUtils.getRowsFromDBWithoutLocks( sourcePath, "Chrome Bookmark Favicons", - `select page_url from icon_mapping` + `SELECT page_url, image_data FROM icon_mapping + INNER JOIN favicon_bitmaps ON (favicon_bitmaps.icon_id = icon_mapping.icon_id) + ` ); target.append("Bookmarks"); @@ -171,10 +173,14 @@ async function testBookmarks(migratorKey, subDirs) { "Telemetry reporting correct." ); Assert.ok(observerNotified, "The observer should be notified upon migration"); - let pageUrls = Array.from(faviconURIs, f => - Services.io.newURI(f.getResultByName("page_url")) - ); - await assertFavicons(pageUrls); + + for (const favicon of favicons) { + await assertFavicon( + favicon.getResultByName("page_url"), + favicon.getResultByName("image_data"), + "image/png" + ); + } } add_task(async function test_Chrome() { |