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

Side by Side Diff: LayoutTests/fast/canvas/canvas-as-image-incremental-repaint.html

Issue 196353013: Convert some repaint tests to not call display() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations, remove do-not-repaint tricky test Created 6 years, 9 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 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 div { 4 div {
5 width:600px; 5 width:600px;
6 height:500px; 6 height:500px;
7 border:2px solid black; 7 border:2px solid black;
8 content: -webkit-canvas(squares); 8 content: -webkit-canvas(squares);
9 } 9 }
10 </style> 10 </style>
11 11 <script src="resources/repaint.js"></script>
12 <script type="application/x-javascript"> 12 <script type="application/x-javascript">
13 if (window.testRunner)
14 testRunner.waitUntilDone();
15
16 var canvasContext;
17 function runRepaintTest()
18 {
19 canvasContext = document.getCSSCanvasContext("2d", "squares", 300, 300);
20 if (window.testRunner) {
21 document.body.offsetTop;
22 testRunner.display();
23 repaintTest();
24 testRunner.notifyDone();
25 } else {
26 setTimeout(repaintTest, 2000);
27 }
28 }
29
30 function repaintTest() 13 function repaintTest()
31 { 14 {
32 draw(); 15 var ctx = document.getCSSCanvasContext("2d", "squares", 300, 300);
33 }
34
35 function draw()
36 {
37 var ctx = canvasContext;
38 16
39 ctx.fillStyle = "rgb(200,0,0)"; 17 ctx.fillStyle = "rgb(200,0,0)";
40 ctx.fillRect (10, 10, 100, 100); 18 ctx.fillRect (10, 10, 100, 100);
41 19
42 ctx.fillStyle = "rgba(0, 0, 200, 0.5)"; 20 ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
43 ctx.fillRect (50, 50, 100, 100); 21 ctx.fillRect (50, 50, 100, 100);
44 } 22 }
45 </script> 23 </script>
46 </head> 24 </head>
47 <body onload="runRepaintTest()"> 25 <body onload="runRepaintTest()">
48 <div></div> 26 <div></div>
49 </body> 27 </body>
50 </html> 28 </html>
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/repaint-rtl-column.html ('k') | LayoutTests/fast/canvas/canvas-incremental-repaint.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698