v1
3/7/2019 by kaiido -00
disable setup HTML
Setup HTML
<canvas id="test" width="3860" height="2160"></canvas>
disable setup JavaScript
Setup JavaScript
const canvas = document.getElementById('test');
const context = canvas.getContext('2d');

const blank = document.createElement('canvas');
    
blank.width = canvas.width;
blank.height = canvas.height;

for (let i = 0; i < Math.floor(Math.random() * 10); ++i) {
  context.fillStyle = '#' + Math.floor(Math.random() * 0xFFFFFF).toString(16);

  context.fillRect(Math.floor(Math.random() * canvas.width),
    Math.floor(Math.random() * canvas.height),
    Math.floor(Math.random() * canvas.width),
    Math.floor(Math.random() * canvas.height));
}

let result;
delete caserun single casemove downdrag and drop case


ready



result = canvas.toDataURL() == blank.toDataURL();
delete caserun single casemove upmove downdrag and drop case


ready



result = !context.getImageData(0, 0, canvas.width, canvas.height).data.some(x => x !== 0);
delete caserun single casemove updrag and drop case


ready



result = !new Uint32Array(context.getImageData(0, 0, canvas.width, canvas.height).data.buffer).some(x => x !== 0);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN