Bug 546648 - Make test_mousecapture.xul wait for the load event of opened windows. r=enndeakin.

--HG--
extra : rebase_source : 112d1f7963fe9c3d92960f6e8fc8c17524d41638
This commit is contained in:
Henri Sivonen 2010-03-09 15:11:24 +02:00
Родитель 360c301ed6
Коммит 0dac3407de
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -88,7 +88,7 @@ function selectionScrollCheck()
// check to ensure that selection dragging scrolls the right scrollable area
otherWindow = window.open("data:text/html,<html><p style='margin-top: 4000px'>This is some text</p></html>", "_blank", "width=200,height=200,scrollbars=yes");
SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
otherWindow.addEventListener("load", function() { SimpleTest.waitForFocus(selectionScrollCheck, otherWindow); }, false);
}
}
@ -186,7 +186,7 @@ function runTests()
// check to ensure that selection dragging scrolls the right scrollable area.
// This should open the page in a new tab.
otherWindow = window.open("data:text/html,<html><p style='margin-top: 4000px'>This is some text</p></html>", "_blank");
SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
otherWindow.addEventListener("load", function() { SimpleTest.waitForFocus(selectionScrollCheck, otherWindow); }, false);
}
function runCaptureTest(element, callback)