Bug 876096 - Try adding waitForFocus, let's see whether that fixes test_activation.xul.

This commit is contained in:
Markus Stange 2013-08-22 15:33:58 +02:00
parent 13f3cb6706
commit cb3847e63b

View File

@ -21,15 +21,16 @@
var ok = window.opener.wrappedJSObject.ok;
var complete = window.opener.wrappedJSObject.complete;
var openerDoc = window.opener.wrappedJSObject.document;
var SimpleTest = window.opener.wrappedJSObject.SimpleTest;
window.onfocus = function () {
SimpleTest.waitForFocus(function () {
ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)");
ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)");
window.opener.focus();
ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)");
ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)");
complete();
}
}, window);
]]></script>