4 var canvas
, context
, pattern
, image
;
8 testRunner
.waitUntilDone();
10 canvas
= document
.getElementById('canvas');
11 context
= canvas
.getContext('2d');
13 image
= document
.createElement('img');
14 image
.setAttribute('src', 'resources/svg-with-feimage-with-foreignobject.svg');
15 image
.onload = function() {
16 pattern
= context
.createPattern(image
, 'repeat');
17 context
.fillStyle
= pattern
;
18 context
.fillRect(0, 0, 100, 100);
20 // This should throw an exception.
21 var pixels
= context
.getImageData(0, 0, 1, 1).data
;
22 finishTest('FAIL - svg with feImage with foreignObject did not taint the canvas.');
29 function finishTest(output
) {
30 document
.write(output
);
31 if (window
.testRunner
) {
32 testRunner
.dumpAsText();
33 testRunner
.notifyDone();
37 <body onload='runTest()'
>
38 Test for crbug.com/
279445: An SVG image with an feImage with a foreignObject should taint the canvas.
<br/>
39 FAIL - test did not run.
<br/>
40 <canvas id='canvas' width='
100' height='
100'
></canvas>