| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Canvas test: 2d.composite.globalAlpha.range</title> | 2 <title>Canvas test: 2d.composite.globalAlpha.range</title> |
| 3 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 3 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| 4 <link rel="stylesheet" href="../tests.css"> | 4 <link rel="stylesheet" href="../tests.css"> |
| 5 <body> | 5 <body> |
| 6 <p id="passtext">Pass</p> | 6 <p id="passtext">Pass</p> |
| 7 <p id="failtext">Fail</p> | 7 <p id="failtext">Fail</p> |
| 8 <p class="output">These images should be identical:</p> | 8 <p class="output">These images should be identical:</p> |
| 9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (
fallback content)</p></canvas> | 9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (
fallback content)</p></canvas> |
| 10 | 10 |
| 11 <ul id="d"></ul> | 11 <ul id="d"></ul> |
| 12 <script> | 12 <script> |
| 13 description('Test canvas globalCompositeOperator'); | 13 description('Test canvas globalCompositeOperator'); |
| 14 var compModes = [ "clear", "copy", "source-over", "destination-over", "sourc
e-in", "destination-in", "source-out", "destination-out", "source-atop", "destin
ation-atop", "xor", "lighter", "multiply", "screen", "overlay", "darken", "light
en", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exc
lusion", "hue", "saturation", "color", "luminosity"]; | 14 var compModes = [ "clear", "copy", "source-over", "destination-over", "sourc
e-in", "destination-in", "source-out", "destination-out", "source-atop", "destin
ation-atop", "xor", "lighter", "multiply", "screen", "overlay", "darken", "light
en", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exc
lusion", "hue", "saturation", "color", "luminosity"]; |
| 15 ctx = document.getElementById("c").getContext("2d"); | 15 ctx = document.getElementById("c").getContext("2d"); |
| 16 for (var i = 0; i < compModes.length; i++) { | 16 for (var i = 0; i < compModes.length; i++) { |
| 17 ctx.globalCompositeOperation = compModes[i]; | 17 ctx.globalCompositeOperation = compModes[i]; |
| 18 shouldBeEqualToString("ctx.globalCompositeOperation", compModes[i]); | 18 shouldBeEqualToString("ctx.globalCompositeOperation", compModes[i]); |
| 19 } | 19 } |
| 20 </script> | 20 </script> |
| 21 <script src="../../../fast/js/resources/js-test-post.js"></script> | |
| OLD | NEW |