Commit 877d246b authored by aestes@apple.com's avatar aestes@apple.com

Re-work a test to not be flaky.

* plugins/embed-prefers-plugins-for-images.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent de362136
2011-03-25 Andy Estes <aestes@apple.com>
Re-work a test to not be flaky.
* plugins/embed-prefers-plugins-for-images.html:
2011-03-25 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
......
......@@ -4,17 +4,25 @@
layoutTestController.waitUntilDone();
}
function logSuccess()
function runTest()
{
var plugin = document.getElementById("plugin");
if (plugin && plugin.testCallback) {
plugin.testCallback("finishTest");
return;
}
layoutTestController.notifyDone();
}
function finishTest()
{
document.getElementById("console").innerHTML = "PASS";
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
<body onload="runTest()">
<div id="console">FAIL</div>
<embed name="plugin" src="image.png" logSrc="1">
<script>
if (plugin.testCallback)
plugin.testCallback("logSuccess");
if (window.layoutTestController)
layoutTestController.notifyDone();
</script>
<embed id="plugin" src="image.png" logSrc="1">
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment