| Index: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..83ac1c71b6bb73ba7785ac9c0320084ba57b835b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
| +<title>Canvas test: security.pattern.cross.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.pattern.cross.sub</h1>
|
| +<p class="desc">Using an unclean pattern makes the target canvas origin-unclean, not the pattern canvas</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("Using an unclean pattern makes the target canvas origin-unclean, not the pattern canvas");
|
| +_addTest(function(canvas, ctx) {
|
| +
|
| +var canvas2 = document.createElement('canvas');
|
| +canvas2.width = 100;
|
| +canvas2.height = 50;
|
| +var ctx2 = canvas2.getContext('2d');
|
| +var p = ctx2.createPattern(document.getElementById('yellow.png'), 'repeat');
|
| +ctx.fillStyle = p;
|
| +ctx.fillRect(0, 0, 100, 50);
|
| +assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
| +assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
| +canvas2.toDataURL();
|
| +ctx2.getImageData(0, 0, 1, 1);
|
| +
|
| +
|
| +});
|
| +</script>
|
| +<img src="http://{{domains[www2]}}:{{ports[http][0]}}/images/yellow.png" id="yellow.png" class="resource">
|
| +
|
|
|