Bug 753323 - Wait until actually in fullscreen before starting screenClientXPConst pointer lock test. r=orange-fix

This commit is contained in:
Chris Pearce 2012-05-22 12:05:55 +12:00
Родитель 75db5419df
Коммит d1eeab1aba
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -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");