mirror of
https://github.com/servo/servo
synced 2026-05-02 12:26:06 +02:00
33 lines
1.1 KiB
HTML
33 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
|
<title>Canvas test: security.reset.sub</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/common/canvas-tests.js"></script>
|
|
<link rel="stylesheet" href="/common/canvas-tests.css">
|
|
<body class="show_output">
|
|
|
|
<h1>security.reset.sub</h1>
|
|
<p class="desc">Resetting the canvas state does not reset the origin-clean flag</p>
|
|
|
|
|
|
<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>
|
|
var t = async_test("Resetting the canvas state does not reset the origin-clean flag");
|
|
_addTest(function(canvas, ctx) {
|
|
|
|
canvas.width = 50;
|
|
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
|
|
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
|
canvas.width = 100;
|
|
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
|
|
|
|
|
});
|
|
</script>
|
|
<img src="http://{{domains[www2]}}:{{ports[http][0]}}/images/yellow.png" id="yellow.png" class="resource">
|
|
|