зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1504062 - fix timeouts in dom test_fullscreen_api.html, r=kats
Differential Revision: https://phabricator.services.mozilla.com/D10723 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
26f3fc7fec
Коммит
ec4136b39b
|
@ -10,14 +10,17 @@ function doRequestFullscreen() {
|
|||
document.removeEventListener("fullscreenchange", handler);
|
||||
document.removeEventListener("fullscreenerror", handler);
|
||||
if (evt.type == "fullscreenchange") {
|
||||
document.addEventListener("fullscreenchange", () => parent.continueTest(evt.type), {once: true});
|
||||
document.exitFullscreen();
|
||||
}
|
||||
} else {
|
||||
parent.continueTest(evt.type);
|
||||
}
|
||||
}
|
||||
parent.ok(document.fullscreenEnabled, "Fullscreen " +
|
||||
`should be enabled in ${parent.testTargetName}`);
|
||||
document.addEventListener("fullscreenchange", handler);
|
||||
document.addEventListener("fullscreenerror", handler);
|
||||
parent.opener.info("Requesting fullscreen");
|
||||
document.documentElement.requestFullscreen();
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -55,6 +55,7 @@ function nextTest() {
|
|||
}
|
||||
|
||||
let test = tests.shift();
|
||||
opener.info("Running " + test[0]);
|
||||
|
||||
// Create an iframe with an allowfullscreen and with an allow attribute.
|
||||
// The request should be denied or allowed, based on the current test.
|
||||
|
|
|
@ -437,7 +437,7 @@ skip-if = toolkit == 'android'
|
|||
[test_formelements.html]
|
||||
[test_fullscreen-api.html]
|
||||
tags = fullscreen
|
||||
skip-if = toolkit == 'android' || (os == 'linux' && !debug) # linux opt/pgo timeouts: bug 1504062
|
||||
skip-if = toolkit == 'android'
|
||||
support-files =
|
||||
file_fullscreen-api.html
|
||||
file_fullscreen-backdrop.html
|
||||
|
|
|
@ -60,9 +60,15 @@ function finish() {
|
|||
|
||||
function nextTest() {
|
||||
if (testWindow) {
|
||||
testWindow.close();
|
||||
}
|
||||
info("Waiting for focus to return to main window");
|
||||
window.addEventListener("focus", function() {
|
||||
info("main window focused, starting next test");
|
||||
SimpleTest.executeSoon(runNextTest);
|
||||
}, {once: true});
|
||||
testWindow.close();
|
||||
} else {
|
||||
SimpleTest.executeSoon(runNextTest);
|
||||
}
|
||||
}
|
||||
|
||||
var gHeadlessSkipList = [
|
||||
|
@ -130,10 +136,12 @@ function runNextTest() {
|
|||
waitForLoadAndPaint(testWindow, function() {
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.waitForFocus(function() {
|
||||
info("Were focused");
|
||||
// For the platforms that support reporting occlusion state (e.g. Mac),
|
||||
// we should wait until the docshell has been activated again,
|
||||
// otherwise, the fullscreen request might be denied.
|
||||
if (testWindow.document.hidden) {
|
||||
info("Waiting for document to unhide");
|
||||
waitForEvent(testWindow.document, "visibilitychange", (event) => {
|
||||
return !testWindow.document.hidden;
|
||||
}, testWindow.begin);
|
||||
|
|
Загрузка…
Ссылка в новой задаче