Index: LayoutTests/css3/images/pixelated-canvas-composited.html |
diff --git a/LayoutTests/css3/images/pixelated-canvas-composited.html b/LayoutTests/css3/images/pixelated-canvas-composited.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e6a0f6300e9de8a9d8e3a361c8c005a941804ab8 |
--- /dev/null |
+++ b/LayoutTests/css3/images/pixelated-canvas-composited.html |
@@ -0,0 +1,46 @@ |
+<!DOCTYPE html> |
+<style> |
+ img { |
+ display: none; |
+ } |
+ canvas { |
+ width: 1000px; |
+ height: 1000px; |
+ image-rendering: pixelated; |
+ } |
+ .under { |
+ position: absolute; |
+ top: 0; |
+ left: 0; |
+ z-index: 1; |
+ } |
+ .over { |
+ position: absolute; |
+ top: 250px; |
+ left: 250px; |
+ z-index: 2; |
+ } |
+</style> |
+<body> |
+ <img src="resources/dice_alpha.png"> |
+ <!-- One canvas should be overlaid on the other at an offset. Both canvases should be upscaled without blurring. --> |
+ <canvas class="under" width="300" height="300"></canvas> |
+ <canvas class="over" width="300" height="300"></canvas> |
+</body> |
+<script> |
+ // Ignore the render tree. |
+ if (window.testRunner) |
+ window.testRunner.dumpAsTextWithPixelResults(); |
+ |
+ var image = document.getElementsByTagName("img")[0]; |
+ |
+ function drawToContext(context) { |
+ context.drawImage(image, -0.5, -0.5, 300, 300); |
+ } |
+ |
+ function draw() { |
+ drawToContext(document.getElementsByTagName("canvas")[0].getContext("2d")); |
+ drawToContext(document.getElementsByTagName("canvas")[1].getContext("2d")); |
+ } |
+ window.onload = draw; |
+</script> |