Bug 1394132 - Ensure we only handle focus event once. r?masayuki
MozReview-Commit-ID: 6VoRMXpNco4
--- a/dom/tests/mochitest/pointerlock/file_targetOutOfFocus.html
+++ b/dom/tests/mochitest/pointerlock/file_targetOutOfFocus.html
@@ -38,17 +38,17 @@
function runTests () {
ok(divPointerLock, "Pointer should be locked even if " +
"the element being locked is not focused");
}
input.addEventListener("focus", function() {
div.requestPointerLock();
- });
+ }, { once: true });
document.addEventListener("pointerlockchange", function (e) {
if (document.pointerLockElement === div) {
divPointerLock = true;
addFullscreenChangeContinuation("exit", function() {
runTests();
SimpleTest.finish();
});