blob: ca7d3a28784cc24f2996adc6990cf93e8ec3deb9 [file] [log] [blame]
<!DOCTYPE html>
<title>Canvas test: security.pattern.create</title>
<meta name="author" content="Philip Taylor">
<script src="../common/canvas-tests.js"></script>
<link rel="stylesheet" href="../common/canvas-tests.css">
<body class="show_output">
<h1><a href="index.security.html">security</a>.<a href="index.security.pattern.html">pattern</a>.create</h1>
<p class="desc">Creating an unclean pattern does not make the canvas origin-unclean</p>
<div class="refs">Spec references:
<ul>
<li><a href="../annotated-spec/canvas.html#testrefs.security.start">security.start</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>
<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {
var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
canvas.toDataURL();
ctx.getImageData(0, 0, 1, 1);
_assert(true, "true"); // okay if there was no exception
});
</script>
<img src="../resources/yellow.png" id="yellow.png" class="resource">