tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_bug685470.js (918B)


      1 add_task(async function () {
      2  const html =
      3    '<p id="p1" title="tooltip is here">This paragraph has a tooltip.</p>';
      4  await BrowserTestUtils.openNewForegroundTab(
      5    gBrowser,
      6    "data:text/html," + html
      7  );
      8 
      9  await SpecialPowers.pushPrefEnv({ set: [["ui.tooltip.delay_ms", 0]] });
     10 
     11  await BrowserTestUtils.synthesizeMouseAtCenter(
     12    "#p1",
     13    { type: "mousemove" },
     14    gBrowser.selectedBrowser
     15  );
     16  await BrowserTestUtils.synthesizeMouseAtCenter(
     17    "#p1",
     18    {},
     19    gBrowser.selectedBrowser
     20  );
     21 
     22  // Wait until the tooltip timeout triggers that would normally have opened the popup.
     23  await new Promise(resolve => setTimeout(resolve, 0));
     24  is(
     25    document.getElementById("aHTMLTooltip").state,
     26    "closed",
     27    "local tooltip is closed"
     28  );
     29  is(
     30    document.getElementById("remoteBrowserTooltip").state,
     31    "closed",
     32    "remote tooltip is closed"
     33  );
     34 
     35  gBrowser.removeCurrentTab();
     36 });