Bug 543821, iterate a bit more and wait for the xml datasource to load in this test, should fix intermittent orange

This commit is contained in:
Neil Deakin 2010-02-04 09:12:41 -05:00
parent aaca6a970a
commit 451c9fc14a

View File

@ -247,7 +247,15 @@ function runTest()
root.setAttribute("datasources", "animals.xml");
$("binding").setAttribute("predicate", "[name]");
setTimeout(runTest, 0);
function waitForDatasource() {
// wait for the datasource to be available before continuing the test
if (root.builder.datasource instanceof XMLDocument)
runTest();
else
setTimeout(waitForDatasource, 100);
}
setTimeout(waitForDatasource, 0);
return;
}
}