<!DOCTYPE html>
<p>
Regression test for crbug.com/1499539.
Disables acceleration by using a pattern.
</p>
<canvas id="canvas" width="100" height="100"></canvas>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
}
const canvas1 = document.getElementById('canvas');
const ctx1 = canvas1.getContext('2d');
ctx1.fillStyle = 'blue';
ctx1.fillRect(0, 0, 10, 10);
const canvas2 = document.createElement('canvas');
const ctx2 = canvas2.getContext('2d');
ctx2.fillStyle = 'green';
ctx2.fillRect(0, 0, 10, 10);
const img = new Image();
img.onload = function() {
ctx1.fillStyle = ctx1.createPattern(img, 'repeat');
ctx1.fillRect(0, 0, 40, 40);
ctx1.drawImage(canvas2, 20, 0);
if (window.testRunner) {
testRunner.notifyDone();
}
}
img.src = 'resources/pattern.png';
</script>