Index: LayoutTests/fast/css/object-fit-canvas-expected.html |
diff --git a/LayoutTests/fast/css/object-fit-canvas-expected.html b/LayoutTests/fast/css/object-fit-canvas-expected.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..64aa98ae3b0432f6a10fa6db4bf72340c587f645 |
--- /dev/null |
+++ b/LayoutTests/fast/css/object-fit-canvas-expected.html |
@@ -0,0 +1,70 @@ |
+<!DOCTYPE html> |
+ |
+<html> |
+ <head> |
+ <title>object-fit on canvas</title> |
+ <style type="text/css"> |
+ .group > div { |
+ display: inline-block; |
+ overflow: hidden; |
+ width: 72px; |
+ height: 72px; |
+ margin: 2px 10px; |
+ border: 1px solid black; |
+ background-color: gray; |
+ } |
+ |
+ .group > * > * { display: block; } |
+ .group > *:nth-child(1) * { width:100%; height:100%; } |
+ .group > *:nth-child(2) * { width:100%; margin-top:25%; } |
+ .group > *:nth-child(3) * { height:100%; margin-left:-50%; } |
+ .group > *:nth-child(4) * { width:288px; margin-left:-108px; margin-top:-36px; } |
+ .group > *:nth-child(5) * { width:100%; margin-top:25%; } |
+ .group > *:nth-child(6) * { width:100%; margin-top:25%; } |
+ .group > *:nth-child(7) * { width:100%; height:100%; } |
+ </style> |
+ <script type="text/javascript" charset="utf-8"> |
+ if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+ var circlesImage; |
+ |
+ function paintCanvas(canvas) |
+ { |
+ var ctx = canvas.getContext('2d'); |
+ ctx.drawImage(circlesImage, 0, 0); |
+ } |
+ |
+ function init() |
+ { |
+ circlesImage = new Image() |
+ circlesImage.addEventListener('load', imageLoaded, false); |
+ circlesImage.src = "resources/circles-landscape.png"; |
+ } |
+ |
+ function imageLoaded() |
+ { |
+ var canvases = document.getElementsByTagName('canvas'); |
+ for (var i = 0; i < canvases.length; ++i) |
+ paintCanvas(canvases[i]) |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ } |
+ |
+ window.addEventListener('load', init, false); |
+ </script> |
+ </head> |
+ <body> |
+ |
+ <div class="group"> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ <div><canvas width="288" height="144"></canvas></div> |
+ </div> |
+ |
+ </body> |
+</html> |