Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: LayoutTests/compositing/plugins/invalidate_rect.html

Issue 181653006: Remove testRunner.display() from most compositing/ tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 5
6 <style type="text/css"> 6 <style type="text/css">
7 #transform { 7 #transform {
8 -webkit-transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg); 8 -webkit-transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg);
9 } 9 }
10 </style> 10 </style>
11 11
12 <script> 12 <script>
13 if (window.testRunner) 13 if (window.testRunner) {
14 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
15 testRunner.waitUntilDone();
16 }
15 17
16 var paintCount = 0; 18 var paintCount = 0;
17 19
18 function onLoad() 20 function onLoad()
19 { 21 {
20 testRunner.display(); 22 runAfterDisplay(function() {
21 paintCount = 0; 23 paintCount = 0;
22 document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200); 24 document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200);
23 testRunner.displayInvalidatedRegion(); 25 testRunner.displayInvalidatedRegion();
24 if (paintCount > 0) 26 if (paintCount > 0)
25 document.getElementById('result').innerHTML = "SUCCESS"; 27 document.getElementById('result').innerHTML = "SUCCESS";
28 testRunner.notifyDone();
29 });
26 } 30 }
27 31
28 function didPaint() 32 function didPaint()
29 { 33 {
30 paintCount++; 34 paintCount++;
31 } 35 }
32 </script> 36 </script>
33 </head> 37 </head>
34 <body onload="onLoad();"> 38 <body onload="onLoad();">
35 This tests that NPN_InvalidateRect works correctly. 39 This tests that NPN_InvalidateRect works correctly.
36 40
37 <div id="result">FAILURE</div> 41 <div id="result">FAILURE</div>
38 42
39 <!-- force this page to be composited --> 43 <!-- force this page to be composited -->
40 <div id="transform"> 44 <div id="transform">
41 </div> 45 </div>
42 46
43 <!-- Move the plugin to the middle of the page. This ensures that invalidate() will invalidate the correct region. --> 47 <!-- Move the plugin to the middle of the page. This ensures that invalidate() will invalidate the correct region. -->
44 <div style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;"> 48 <div style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;">
45 49
46 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200" onpaintevent="didPaint()" windowedPlugin="false"></embed> 50 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200" onpaintevent="didPaint()" windowedPlugin="false"></embed>
47 51
48 </div> 52 </div>
49 </body> 53 </body>
50 </html> 54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698