Bug 1191597 part 6 - Remove windowed plugins before closing to work around
bug 1237853.
--- a/dom/html/test/file_fullscreen-plugins.html
+++ b/dom/html/test/file_fullscreen-plugins.html
@@ -56,16 +56,20 @@ function ok(condition, msg) {
function is(a, b, msg) {
opener.is(a, b, "[plugins] " + msg);
}
function e(id) {
return document.getElementById(id);
}
+function removeElement(e) {
+ e.parentNode.removeChild(e);
+}
+
const isMacOs = navigator.appVersion.indexOf("Macintosh") != -1;
var windowedPlugin = null;
function begin() {
// Delay test startup long enough for the windowed plugin in the subframe to
// start up and create its window.
opener.SimpleTest.executeSoon(function() {
@@ -106,16 +110,20 @@ function nonMacTest2() {
ok(document.mozFullScreen, "Request for full-screen with non-plugin focused should be granted.");
// Focus a windowed plugin, full-screen should be revoked.
addFullscreenChangeContinuation("exit", nonMacTest3);
e("windowed-plugin").focus();
}
function nonMacTest3() {
ok(!document.mozFullScreen, "Full-screen should have been revoked when windowed-plugin was focused.");
+ // Remove windowed plugins before closing the window
+ // to work around bug 1237853.
+ removeElement(e("windowed-plugin"));
+ removeElement(e("subdoc-plugin").contentDocument.getElementById("windowed-plugin"));
opener.nextTest();
}
var fullScreenChangeCount = 0;
function createWindowedPlugin() {
var p = document.createElement("embed");
p.setAttribute("type", "application/x-test");