blob: c8a9c5b5b42a060147f7c6681fe7b985eb1938bc [file] [log] [blame]
commit-queue@webkit.orgd8e5ce12011-04-02 02:03:23 +00001<!DOCTYPE html>
2
3<html>
4<head>
5 <script>
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +00006 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
commit-queue@webkit.orgd8e5ce12011-04-02 02:03:23 +00009 }
10
11 var paintCount = 0;
12
13 function onLoad() {
14 var pluginDiv = document.getElementById("pluginDiv");
15 // Create the plugin in the middle of the page.
16 pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" onpaintevent=\"didPaint()\" windowedPlugin=\"false\"></embed>";
jhoneycutt@apple.comdcb228b2014-05-29 23:52:32 +000017 if (window.internals)
18 internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +000019 testRunner.displayInvalidatedRegion();
commit-queue@webkit.orgd8e5ce12011-04-02 02:03:23 +000020 }
21
22 function notifyDone() {
23 document.getElementById('result').innerHTML = "SUCCESS";
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +000024 testRunner.notifyDone();
commit-queue@webkit.orgd8e5ce12011-04-02 02:03:23 +000025 }
26
27 function didPaint() {
28 paintCount++;
29 setTimeout("notifyDone();", 50);
30 }
31 </script>
32</head>
33<body onload="setTimeout(onLoad(), 50);">
34 This tests that dynamically added windowless plugins receive paint events on creation.
35
36 <div id="result">FAILURE</div>
37
38 <div id="pluginDiv" style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;">
39 </div>
40</body>
41</html>