// Send a mousemove at a known position to start the test.
await BrowserTestUtils.synthesizeMouse( "#target",
-5,
-5,
{ type: "mousemove" },
browser
);
// show tooltip by mousemove into target.
let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown");
await BrowserTestUtils.synthesizeMouse( "#target",
5,
15,
{ type: "mousemove" },
browser
);
await popupShownPromise;
// hide tooltip by mousemove to outside.
let popupHiddenPromise = BrowserTestUtils.waitForEvent(
document, "popuphidden"
);
await BrowserTestUtils.synthesizeMouse( "#target",
-5,
15,
{ type: "mousemove" },
browser
);
await popupHiddenPromise;
// mousemove into the target and start drag by emulation via nsIDragService. // Note that on some platforms, we cannot actually start the drag by // synthesized events. E.g., Windows waits an actual mousemove event after // dragstart.
// Emulate a buggy mousemove event. widget might dispatch mousemove event // during drag.
function tooltipNotExpected() {
ok(false, "tooltip is shown during drag");
}
addEventListener("popupshown", tooltipNotExpected, true);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.