blob: 1b9acbc1f907a972f83fbf7f7a5a80740fbb7f7f [file] [log] [blame]
chang.shu@nokia.comd5cb9102010-05-21 20:47:13 +00001<!DOCTYPE html>
2<title>Canvas test: 2d.strokeRect.globalcomposite</title>
3<script src="../tests.js"></script>
4<link rel="stylesheet" href="../tests.css">
andreas.kling@nokia.com7817c162010-11-07 13:49:39 +00005<body>
6<p id="passtext">Pass</p>
7<p id="failtext">Fail</p>
8<p class="output">These images should be identical:</p>
chang.shu@nokia.comd5cb9102010-05-21 20:47:13 +00009<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
10<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
11<ul id="d"></ul>
12<script>
13_addTest(function(canvas, ctx) {
14
15ctx.globalCompositeOperation = 'source-in';
16ctx.strokeStyle = '#f00';
17ctx.lineWidth = 50;
18ctx.strokeRect(25, 24, 50, 2);
19_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
20
21
22});
23</script>
24