Bug 1773348 [wpt PR 34351] - Fix 'colour' -> 'color' spelling in WPT Canvas tests...
[gecko.git] / testing / web-platform / tests / html / canvas / element / shadows / 2d.shadow.alpha.2.html
blobab0e2bbc330d45328273e72ac6cd40f8466a72c7
1 <!DOCTYPE html>
2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
3 <title>Canvas test: 2d.shadow.alpha.2</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/html/canvas/resources/canvas-tests.js"></script>
7 <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
8 <body class="show_output">
10 <h1>2d.shadow.alpha.2</h1>
11 <p class="desc">Shadow color alpha components are used</p>
14 <p class="output">Actual output:</p>
15 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
16 <p class="output expectedtext">Expected output:<p><img src="2d.shadow.alpha.2.png" class="output expected" id="expected" alt="">
17 <ul id="d"></ul>
18 <script>
19 var t = async_test("Shadow color alpha components are used");
20 _addTest(function(canvas, ctx) {
22 ctx.fillStyle = '#f00';
23 ctx.fillRect(0, 0, 100, 50);
24 ctx.shadowColor = 'rgba(0, 0, 255, 0.5)';
25 ctx.shadowOffsetY = 50;
26 ctx.fillRect(0, -50, 100, 50);
28 _assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
31 });
32 </script>