summaryrefslogtreecommitdiffstats
path: root/browser/components/firefoxview/tests/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/firefoxview/tests/chrome')
-rw-r--r--browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html21
1 files changed, 17 insertions, 4 deletions
diff --git a/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html b/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html
index 52ddc277c7..abea8725ee 100644
--- a/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html
+++ b/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html
@@ -37,8 +37,8 @@
const { BrowserTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/BrowserTestUtils.sys.mjs"
);
- const { FirefoxViewPlacesQuery } = ChromeUtils.importESModule(
- "resource:///modules/firefox-view-places-query.sys.mjs"
+ const { PlacesQuery } = ChromeUtils.importESModule(
+ "resource://gre/modules/PlacesQuery.sys.mjs"
);
const { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
@@ -52,7 +52,7 @@
const fxviewTabList = document.querySelector("fxview-tab-list");
let tabItems = [];
- const placesQuery = new FirefoxViewPlacesQuery();
+ const placesQuery = new PlacesQuery();
const URLs = [
"http://mochi.test:8888/browser/",
@@ -106,7 +106,20 @@
});
await historyUpdated.promise;
- fxviewTabList.tabItems = [...history.values()].flat();
+ fxviewTabList.tabItems = Array.from(history.values()).flat().map(visit => ({
+ ...visit,
+ time: visit.date.getTime(),
+ title: visit.title || visit.url,
+ icon: `page-icon:${visit.url}`,
+ primaryL10nId: "fxviewtabrow-tabs-list-tab",
+ primaryL10nArgs: JSON.stringify({
+ targetURI: visit.url,
+ }),
+ secondaryL10nId: "fxviewtabrow-options-menu-button",
+ secondaryL10nArgs: JSON.stringify({
+ tabTitle: visit.title || visit.url,
+ }),
+ }));
await fxviewTabList.getUpdateComplete();
tabItems = Array.from(fxviewTabList.rowEls);