mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1424074 - Register event listener earlier in browser_bug703210.js. r=Paolo
This commit is contained in:
parent
b33da27b5b
commit
58ee47803d
@ -13,19 +13,19 @@ add_task(async function() {
|
||||
SpecialPowers.pushPrefEnv({"set": [["ui.tooltipDelay", 0]]}, resolve);
|
||||
});
|
||||
|
||||
// Send a mousemove at a known position to start the test.
|
||||
await BrowserTestUtils.synthesizeMouseAtCenter("#p2", { type: "mousemove" }, browser);
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown", false, event => {
|
||||
is(event.originalTarget.localName, "tooltip", "tooltip is showing");
|
||||
return true;
|
||||
});
|
||||
await BrowserTestUtils.synthesizeMouseAtCenter("#p1", { type: "mousemove" }, browser);
|
||||
await popupShownPromise;
|
||||
|
||||
let popupHiddenPromise = BrowserTestUtils.waitForEvent(document, "popuphidden", false, event => {
|
||||
is(event.originalTarget.localName, "tooltip", "tooltip is hidden");
|
||||
return true;
|
||||
});
|
||||
|
||||
// Send a mousemove at a known position to start the test.
|
||||
await BrowserTestUtils.synthesizeMouseAtCenter("#p2", { type: "mousemove" }, browser);
|
||||
await BrowserTestUtils.synthesizeMouseAtCenter("#p1", { type: "mousemove" }, browser);
|
||||
await popupShownPromise;
|
||||
await BrowserTestUtils.synthesizeMouseAtCenter("#p2", { type: "mousemove" }, browser);
|
||||
await popupHiddenPromise;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user