commit-queue@webkit.org | d8e5ce1 | 2011-04-02 02:03:23 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | <html> |
| 4 | <head> |
| 5 | <script>
|
rniwa@webkit.org | 5cf7fa8 | 2012-06-15 07:38:37 +0000 | [diff] [blame] | 6 | if (window.testRunner) {
|
| 7 | testRunner.dumpAsText();
|
| 8 | testRunner.waitUntilDone();
|
commit-queue@webkit.org | d8e5ce1 | 2011-04-02 02:03:23 +0000 | [diff] [blame] | 9 | } |
| 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.com | dcb228b | 2014-05-29 23:52:32 +0000 | [diff] [blame] | 17 | if (window.internals)
|
| 18 | internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
|
rniwa@webkit.org | 5cf7fa8 | 2012-06-15 07:38:37 +0000 | [diff] [blame] | 19 | testRunner.displayInvalidatedRegion();
|
commit-queue@webkit.org | d8e5ce1 | 2011-04-02 02:03:23 +0000 | [diff] [blame] | 20 | }
|
| 21 |
|
| 22 | function notifyDone() {
|
| 23 | document.getElementById('result').innerHTML = "SUCCESS";
|
rniwa@webkit.org | 5cf7fa8 | 2012-06-15 07:38:37 +0000 | [diff] [blame] | 24 | testRunner.notifyDone();
|
commit-queue@webkit.org | d8e5ce1 | 2011-04-02 02:03:23 +0000 | [diff] [blame] | 25 | }
|
| 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> |