diff --git a/layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul b/layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul index 06b90cae392e..c3cce54e51f8 100644 --- a/layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul +++ b/layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul @@ -96,10 +96,16 @@ return; } + window.focus(); // Run the test in a separate window so we get a clean browser window. win = window.open("data:text/html,", "", "scrollbars=yes,toolbar,menubar,width=500,height=500"); + setTimeout(setupWindow, 0); + } + + function setupWindow() { win.addEventListener("load", doTest, false); + win.focus(); } nextTest();