blob: 8a03e8b933fa65c635644764b4902a933f3f49c7 [file] [log] [blame]
// Wait for the load event, run post layout tasks, run the specified function,
// and notify the test runner that the test is done.
var NotifyDone = true;
var DoNotNotifyDone = false;
function runAfterPluginLoad(func, notifyDone, node) {
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', function() {
if (window.internals)
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(node);
if (func)
func();
if (notifyDone && window.testRunner)
testRunner.notifyDone();
}, false);
}