blob: fc6432a51c9af4e480520f1b5e1be27dc6a3c35f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var paintCount = 0;
function onLoad() {
var pluginDiv = document.getElementById("pluginDiv");
// Create the plugin in the middle of the page.
pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" onpaintevent=\"didPaint()\" windowedPlugin=\"false\"></embed>";
testRunner.displayInvalidatedRegion();
}
function notifyDone() {
document.getElementById('result').innerHTML = "SUCCESS";
testRunner.notifyDone();
}
function didPaint() {
paintCount++;
setTimeout("notifyDone();", 50);
}
</script>
</head>
<body onload="setTimeout(onLoad(), 50);">
This tests that dynamically added windowless plugins receive paint events on creation.
<div id="result">FAILURE</div>
<div id="pluginDiv" style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;">
</div>
</body>
</html>