mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 690989 - Ensure we're focused before requesting fullscreen in rollback test. r=smaug a=test-only
This commit is contained in:
parent
870b263221
commit
26c7a9a929
@ -54,6 +54,11 @@ function e(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
function requestFullscreen(element) {
|
||||
element.focus();
|
||||
element.mozRequestFullScreen();
|
||||
}
|
||||
|
||||
function begin() {
|
||||
addListener("change", change1);
|
||||
e("fse").mozRequestFullScreen();
|
||||
@ -65,7 +70,7 @@ function change1() {
|
||||
is(document.mozFullScreenElement, e("fse"), "Body should be FSE");
|
||||
|
||||
// Request full-screen from element not descendent from current FSE.
|
||||
e("non-fse").mozRequestFullScreen();
|
||||
requestFullscreen(e("non-fse"));
|
||||
}
|
||||
|
||||
function error1() {
|
||||
@ -73,7 +78,7 @@ function error1() {
|
||||
addListener("change", change2);
|
||||
is(document.mozFullScreenElement, e("fse"), "FSE should not change");
|
||||
var iframe = e("subdoc");
|
||||
iframe.contentDocument.body.mozRequestFullScreen();
|
||||
requestFullscreen(iframe.contentDocument.body);
|
||||
}
|
||||
|
||||
function change2() {
|
||||
@ -96,14 +101,14 @@ function change4() {
|
||||
removeListener("change", change4);
|
||||
is(document.mozFullScreenElement, null, "Should have left full-screen entirely");
|
||||
addListener("change", change5);
|
||||
e("fse").mozRequestFullScreen();
|
||||
requestFullscreen(e("fse"));
|
||||
}
|
||||
|
||||
function change5() {
|
||||
removeListener("change", change5);
|
||||
addListener("change", change6);
|
||||
is(document.mozFullScreenElement, e("fse"), "FSE should be e('fse')");
|
||||
e("fse-inner").mozRequestFullScreen();
|
||||
requestFullscreen(e("fse-inner"));
|
||||
}
|
||||
|
||||
function change6() {
|
||||
|
Loading…
Reference in New Issue
Block a user