зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1662313: Add a wait on a selectionchange event to test_resizers_resizing_elements to prevent race condition in test; r=masayuki DONTBUILD
Wait for `selectionchange` to ensure that input events have been processed before verifying a target's bounds. Differential Revision: https://phabricator.services.mozilla.com/D88936
This commit is contained in:
Родитель
bce6a28762
Коммит
14408edb59
|
@ -147,8 +147,12 @@ SimpleTest.waitForFocus(async () => {
|
|||
// Move the mouse delta more pixels to the same direction to make sure that the
|
||||
// resize operation has stopped.
|
||||
synthesizeMouse(target, basePosX + deltaX * 2, basePosY + deltaY * 2, {type: "mousemove"});
|
||||
|
||||
// Click outside of the editor to hide the resizers
|
||||
ok(true, "waiting selectionchange to select outside the target element");
|
||||
let promiseSelectionExitEvent = waitForSelectionChange();
|
||||
synthesizeMouseAtCenter(outOfEditor, {});
|
||||
await promiseSelectionExitEvent;
|
||||
|
||||
// Get the new dimensions for the target
|
||||
// XXX I don't know why we need 2px margin to check this on Android.
|
||||
|
|
Загрузка…
Ссылка в новой задаче