Chromium Code Reviews| Index: LayoutTests/compositing/draws-content/canvas-simple-background.html |
| diff --git a/LayoutTests/compositing/draws-content/canvas-simple-background.html b/LayoutTests/compositing/draws-content/canvas-simple-background.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5c42e9bb21f747d0e72d3bb5fbab16278620e823 |
| --- /dev/null |
| +++ b/LayoutTests/compositing/draws-content/canvas-simple-background.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <style type="text/css"> |
| + .container { |
| + width: 60px; |
| + height: 60px; |
| + } |
| + #canvas-simple { |
| + /* No box decorations or background image. */ |
| + /* Solid color background only. */ |
| + background-color: green; |
| + } |
| + </style> |
| + <script> |
| + function drawCanvas(canvasID) { |
| + var canvas = document.getElementById(canvasID); |
| + var context = canvas.getContext("2d"); |
| + context.clearRect(0, 0, canvas.width, canvas.height); |
|
enne (OOO)
2013/07/22 21:57:48
Could you draw something in this canvas too, even
alokp
2013/07/22 23:40:20
DONE. Did the same for WebGL.
|
| + }; |
| + |
| + function doTest() { |
| + // Simple background can be direct-composited with content-layer. |
| + // The container GraphicsLayer does not paint anything. |
| + drawCanvas('canvas-simple'); |
| + }; |
| + window.addEventListener('load', doTest, false); |
| + </script> |
| + </head> |
| + |
| + <body> |
| + <div class="container"> |
| + <canvas id="canvas-simple" width="50" height="50"></canvas> |
| + </div> |
| + </body> |
| +</html> |