forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
canvas2d/drawing-images-to-the-canvas/2d.drawImage.svg.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<title>Canvas test: 2d.drawImage.animated.poster</title> | ||
<meta name="author" content="Daniel Davis"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../../common/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="../../../common/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.svg</h1> | ||
<p class="desc">drawImage() of an SVG image</p> | ||
|
||
<div class="refs">Spec references: | ||
<ul> | ||
<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.svg">2d.drawImage.svg</a> | ||
</ul> | ||
</div> | ||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
<p class="output expectedtext">Expected output:<p><img src="../../../images/green-100x50.png" class="output expected" id="expected" alt=""> | ||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("drawImage() of an SVG image"); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.drawImage(document.getElementById('green.svg'), 0, 0); | ||
_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); | ||
|
||
|
||
}); | ||
</script> | ||
<img src="../../../images/green.svg" id="green.svg" class="resource"> | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.