mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1001821 - Wait for eyedropper to be destroyed before ending tests and checking for leaks. r=pbrosset
This commit is contained in:
parent
6a5ecfe8bf
commit
8ee0f783c5
@ -31,9 +31,10 @@ function spawnTest() {
|
||||
}
|
||||
|
||||
function inspectAndWaitForCopy() {
|
||||
return waitForClipboard(() => {
|
||||
inspectPage(); // setup: inspect the page
|
||||
}, DIV_COLOR);
|
||||
let copied = waitForClipboard(() => {}, DIV_COLOR);
|
||||
let ready = inspectPage(); // resolves once eyedropper is destroyed
|
||||
|
||||
return Promise.all([copied, ready]);
|
||||
}
|
||||
|
||||
function inspectPage() {
|
||||
@ -54,6 +55,7 @@ function inspectPage() {
|
||||
EventUtils.synthesizeMouse(target, x + 10, y + 10, { type: "mousemove" }, win);
|
||||
|
||||
EventUtils.synthesizeMouse(target, x + 10, y + 10, {}, win);
|
||||
return dropper.once("destroy");
|
||||
});
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user