| <title>Canvas test: security.pattern.image.strokeStyle</title> |
| <script src="../tests.js"></script> |
| <link rel="stylesheet" href="../tests.css"> |
| <link rel="prev" href="security.pattern.canvas.fillStyle.html" title="security.pattern.canvas.fillStyle"> |
| <link rel="next" href="security.pattern.canvas.strokeStyle.html" title="security.pattern.canvas.strokeStyle"> |
| <body class="show_output"> |
| <a href="security.pattern.canvas.fillStyle.html" accesskey="p" title="[p] security.pattern.canvas.fillStyle"><</a> |
| <a href="index.html">[index]</a> |
| <a href="security.pattern.canvas.strokeStyle.html" accesskey="n" title="[n] security.pattern.canvas.strokeStyle">></a> |
| <h1><a href="index.security.html">security</a>.<a href="index.security.pattern.html">pattern</a>.<a href="index.security.pattern.image.html">image</a>.strokeStyle</h1> |
| <p class="desc">Setting strokeStyle to a pattern of a different-origin image makes the canvas origin-unclean</p> |
| <div class="refs">References: |
| <li><a href="spec.html#testrefs.security.strokeStyle.image">security.strokeStyle.image</a> |
| <p class="output">Actual output:</p> |
| <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> |
| _addTest(function(canvas, ctx) { |
| var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat'); |
| try { var _thrown = false; canvas.toDataURL(); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: canvas.toDataURL()"); } |
| try { var _thrown = false; ctx.getImageData(0, 0, 1, 1); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: ctx.getImageData(0, 0, 1, 1)"); } |
| <img src="http://excors.googlepages.com/yellow.png" id="yellow.png" class="resource"> |