Bug 1026290: Delay mochitest-chrome redirect until after MozAfterPaint; r=jmaher

This commit is contained in:
Geoff Brown 2014-11-19 15:43:28 -07:00
Родитель df394801a2
Коммит e92ff6ecab
1 изменённых файлов: 12 добавлений и 1 удалений

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

@ -17,9 +17,20 @@
document.dispatchEvent(event);
}
function onLoad() {
function redirectToHarness()
{
redirect("chrome://mochikit/content/harness.xul");
}
function onLoad() {
// Wait for MozAfterPaint, since the listener in browser-test.js is not
// added until then.
window.addEventListener("MozAfterPaint", function testOnMozAfterPaint() {
window.removeEventListener("MozAfterPaint", testOnMozAfterPaint);
setTimeout(redirectToHarness, 0);
});
}
</script>
</head>