Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / gpu / canvas_popup.html
blob80e0db324edce222c005bc601881a337445ab8ec
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script>
5 function popup() {
6 var w = window.open("","","width=200,height=200");
7 var canvas = w.document.createElement("canvas");
8 canvas.width = 100;
9 canvas.height = 100;
10 w.document.body.appendChild(canvas);
12 var ctx = canvas.getContext('2d');
13 ctx.fillStyle = "rgb(255,165,0)";
14 ctx.fillRect(0, 0, 100, 100);
16 var imageData = ctx.getImageData(50, 50, 1, 1);
17 document.title = imageData.data[0] + ", " +
18 imageData.data[1] + ", " +
19 imageData.data[2];
21 window.domAutomationController.setAutomationId(1);
22 if (imageData.data[0] == 255 &&
23 imageData.data[1] == 165 &&
24 imageData.data[2] == 0)
25 window.domAutomationController.send("SUCCESS");
26 else
27 window.domAutomationController.send("FAILED");
29 </script>
30 </head>
31 <body onload="popup()">
32 </body>
33 </html>