Roll r168668 back in.
[WebKit-https.git] / LayoutTests / platform / mac / plugins / testplugin-onnew-onpaint.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5     <script src="../../../resources/plugin.js"></script>
6     <script type="text/javascript" charset="utf-8">
7         if (window.testRunner)
8             testRunner.dumpAsText();
9
10         function log(m)
11         {
12             document.getElementById('log').innerHTML += m + '<br>';
13         }
14         
15         function newWasCalled()
16         {
17             log("New called");
18         }
19
20         var didPaint = false;
21         function gotPaintEvent()
22         {
23             // Only log once to avoid paint differences betweeen platforms.
24             if (!didPaint) {
25                 log("Paint event was handled");
26                 didPaint = true;
27             }
28         }
29
30         runAfterPluginLoad(null, NotifyDone);
31     </script>
32 </head>
33 <body>
34     <embed type="application/x-webkit-test-netscape" onnew="newWasCalled()" onpaintevent="gotPaintEvent()"></embed>
35     <div id="log">
36     </div>
37 </body>
38 </html>