зеркало из https://github.com/mozilla/pjs.git
Bug 753323 - Wait until actually in fullscreen before starting screenClientXPConst pointer lock test. r=orange-fix
This commit is contained in:
Родитель
75db5419df
Коммит
d1eeab1aba
|
@ -85,15 +85,25 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633602
|
|||
}
|
||||
}, false);
|
||||
|
||||
document.addEventListener("mozfullscreenchange", function() {
|
||||
function fullscreenchange() {
|
||||
var screenX = window.screenX;
|
||||
var screenY = window.screenY;
|
||||
if (document.mozFullScreenElement === div) {
|
||||
if (screenX != 0 || screenY != 0) {
|
||||
todo(screenX == 0 && screenY == 0,
|
||||
"We should only receive fullscreenchange once we've finished fullscreen transition " +
|
||||
"window.screenX=" + screenX + " window.screenY=" + screenY);
|
||||
setTimeout(fullscreenchange, 250);
|
||||
return;
|
||||
}
|
||||
div.addEventListener("mousemove", moveUnlocked, false);
|
||||
synthesizeMouseAtCenter(div, { type: "mousemove" }, window);
|
||||
} else {
|
||||
runTests();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
document.addEventListener("mozfullscreenchange", fullscreenchange, false);
|
||||
|
||||
function start() {
|
||||
div = document.getElementById("div");
|
||||
|
|
Загрузка…
Ссылка в новой задаче