OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 | |
3 <html> | |
4 <head> | |
5 | |
6 <style type="text/css"> | |
7 #transform { | |
8 transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg); | |
9 } | |
10 </style> | |
11 | |
12 <script src="../../resources/run-after-layout-and-paint.js"></script> | |
13 <script> | |
14 if (window.testRunner) { | |
15 testRunner.dumpAsText(); | |
16 testRunner.waitUntilDone(); | |
17 } | |
18 | |
19 var paintCount = 0; | |
20 | |
21 function onLoad() | |
22 { | |
23 runAfterLayoutAndPaint(function() { | |
24 paintCount = 0; | |
25 document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200); | |
26 runAfterLayoutAndPaint(function() { | |
27 if (paintCount > 0) | |
28 document.getElementById('result').innerHTML = "SUCCESS"; | |
29 if (window.testRunner) | |
30 testRunner.notifyDone(); | |
31 }); | |
32 }); | |
33 } | |
34 | |
35 function didPaint() | |
36 { | |
37 paintCount++; | |
38 } | |
39 </script> | |
40 </head> | |
41 <body onload="onLoad();"> | |
42 This tests that NPN_InvalidateRect works correctly. | |
43 | |
44 <div id="result">FAILURE</div> | |
45 | |
46 <!-- force this page to be composited --> | |
47 <div id="transform"> | |
48 </div> | |
49 | |
50 <!-- Move the plugin to the middle of the page. This ensures that invalidate()
will invalidate the correct region. --> | |
51 <div style="position: absolute; left: 300px; top: 300px; height: 400px; width:
400px; padding: 1em;"> | |
52 | |
53 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200"
height="200" onpaintevent="didPaint()" windowedPlugin="false"></embed> | |
54 | |
55 </div> | |
56 </body> | |
57 </html> | |
OLD | NEW |