Bug 899910 - Intermittent TEST-UNEXPECTED-FAIL | layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul, r=tn

--HG--
extra : rebase_source : 58d21857e892a875acbea32d653f243ba9c75ad6
This commit is contained in:
Olli Pettay 2013-12-12 00:09:29 +02:00
parent 88c665112f
commit e18f86c2b3

View File

@ -32,14 +32,6 @@
}
function doTest(evt) {
if (tests[testIndex].maximize) {
SimpleTest.info("Maximizing test " + testIndex + " window" + testInfo());
Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator)
.getMostRecentWindow("navigator:browser")
.maximize();
}
var initialCount = win.mozPaintCount;
function nextStep() {
@ -65,7 +57,22 @@
nextTest();
}
SimpleTest.executeSoon(nextStep);
if (tests[testIndex].maximize) {
function resizeListener() {
win.removeEventListener("resize", resizeListener, true);
// We want a paint after resize.
initialCount = win.mozPaintCount;
SimpleTest.executeSoon(nextStep);
}
win.addEventListener("resize", resizeListener, true);
SimpleTest.info("Maximizing test " + testIndex + " window" + testInfo());
Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator)
.getMostRecentWindow("navigator:browser")
.maximize();
} else {
SimpleTest.executeSoon(nextStep);
}
}
function nextTest() {