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

Side by Side Diff: LayoutTests/compositing/visibility/visibility-simple-canvas2d-layer.html

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 years, 3 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 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 canvas { 5 canvas {
6 background-color: rgba(0, 0, 0, 1); 6 background-color: rgba(0, 0, 0, 1);
7 } 7 }
8 8
9 .hidden { 9 .hidden {
10 visibility: hidden; 10 visibility: hidden;
11 } 11 }
12 12
13 .visible { 13 .visible {
14 visibility: visible; 14 visibility: visible;
15 } 15 }
16 16
17 .composited { 17 .composited {
18 -webkit-transform: translatez(0); 18 -webkit-transform: translatez(0);
19 } 19 }
20 </style> 20 </style>
21 21
22 <script> 22 <script>
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.dumpAsText(true); 24 testRunner.dumpAsTextWithPixelResults();
25 25
26 function drawCanvas(canvasID, color) 26 function drawCanvas(canvasID, color)
27 { 27 {
28 var theCanvas = document.getElementById(canvasID); 28 var theCanvas = document.getElementById(canvasID);
29 var canvasContext = theCanvas.getContext("2d"); 29 var canvasContext = theCanvas.getContext("2d");
30 canvasContext.fillStyle = color; 30 canvasContext.fillStyle = color;
31 canvasContext.fillRect(0, 0, 150, 150); 31 canvasContext.fillRect(0, 0, 150, 150);
32 } 32 }
33 33
34 function init() 34 function init()
35 { 35 {
36 drawCanvas("one", "green"); 36 drawCanvas("one", "green");
37 drawCanvas("two", "red"); 37 drawCanvas("two", "red");
38 drawCanvas("three", "red"); 38 drawCanvas("three", "red");
39 } 39 }
40 </script> 40 </script>
41 </head> 41 </head>
42 42
43 <body onload="init()"> 43 <body onload="init()">
44 <!-- Tests CSS visibility flag for a composited canvas2D layer. --> 44 <!-- Tests CSS visibility flag for a composited canvas2D layer. -->
45 <!-- Pixel test only. Only the green canvas2d should be visible. The other t wo should be hidden. --> 45 <!-- Pixel test only. Only the green canvas2d should be visible. The other t wo should be hidden. -->
46 <div><canvas id="one" class="composited visible" width="150" height="150"></ canvas></div> 46 <div><canvas id="one" class="composited visible" width="150" height="150"></ canvas></div>
47 <div><canvas id="two" class="hidden" width="150" height="150"></canvas></div > 47 <div><canvas id="two" class="hidden" width="150" height="150"></canvas></div >
48 <div><canvas id="three" class="composited hidden" width="150" height="150">< /canvas></div> 48 <div><canvas id="three" class="composited hidden" width="150" height="150">< /canvas></div>
49 </body> 49 </body>
50 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698