Bug 899910, random failure in test_leaf_layers_partition_browser_window.xul (windows only), r=tn

--HG--
rename : mobile/android/base/resources/xml-v11/preferences_search.xml => mobile/android/base/resources/xml/preferences_search.xml
extra : rebase_source : 02620212a533367a47bd112cddb716e7b84a903f
This commit is contained in:
Olli Pettay 2013-12-21 03:26:53 +02:00
parent fa4b20986a
commit c3da96d885

View File

@ -44,17 +44,25 @@
isnot(win.mozPaintCount, initialCount, "mozPaintCount has increased" + testInfo());
var success = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.leafLayersPartitionWindow();
// "[leafLayersPartitionWindow()] Always returns true in non-DEBUG builds."
ok(success,
"Leaf layers should form a non-overlapping partition of the browser window" + testInfo() +
(success ? "" : ". [Set MOZ_DUMP_PAINT_LIST=1 env var to investigate.]"));
function testLeafLayersPartitionWindow() {
var success = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.leafLayersPartitionWindow();
// "[leafLayersPartitionWindow()] Always returns true in non-DEBUG builds."
// To prevent random failures on Windows, try to run this again after a timeout.
if (!success && navigator.platform.indexOf("Win") >= 0) {
setTimeout(testLeafLayersPartitionWindow, 100);
return;
}
ok(success,
"Leaf layers should form a non-overlapping partition of the browser window" + testInfo() +
(success ? "" : ". [Set MOZ_DUMP_PAINT_LIST=1 env var to investigate.]"));
win.close();
++testIndex;
nextTest();
win.close();
++testIndex;
nextTest();
}
testLeafLayersPartitionWindow();
}
if (tests[testIndex].maximize) {