summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/test/browser/browser_context_menu_item.js
blob: 6a4883ab93db078193a5941779bb207bc7339261 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"use strict";

// Test that we do not set icons in individual tile and card context menus on
// newtab page.
test_newtab({
  test: async function test_contextMenuIcons() {
    const siteSelector = ".top-sites-list:not(.search-shortcut, .placeholder)";
    await ContentTaskUtils.waitForCondition(
      () => content.document.querySelector(siteSelector),
      "Topsites have loaded"
    );
    const contextMenuItems = await content.openContextMenuAndGetOptions(
      siteSelector
    );
    let icon = contextMenuItems[0].querySelector(".icon");
    ok(!icon, "icon was not rendered");
  },
});