Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / chrome / test / data / gpu / feature_canvas2d.html
blob684ef0f5d710254cfff25c1d643a99b252678eef
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>GPU Feature Testing: Canvas2D</title>
6 <script>
7 var frameCount = 0;
8 var context = null;
10 function init() {
11 var canvas = document.getElementById("da-canvas");
12 if (!canvas)
13 return;
14 try {
15 context = canvas.getContext("2d");
16 } catch(e) {}
19 function runTest() {
20 init();
21 if (context)
22 window.webkitRequestAnimationFrame(draw);
23 else
24 endTest();
27 function draw() {
28 frameCount++;
29 context.fillRect(0, 0, 100, frameCount);
30 if (frameCount == 6) {
31 endTest();
32 } else {
33 window.webkitRequestAnimationFrame(draw);
37 function endTest() {
38 domAutomationController.setAutomationId(1);
39 domAutomationController.send("FINISHED");
41 </script>
42 </head>
43 <body onload="runTest()">
44 Canvas2D should trigger GPU process launch if accelerated-2d-canvas is allowed.
45 300x300 is enough to trigger accelerated canvas 2D.
46 <canvas id="da-canvas" width="300" height="300"></canvas>
47 </body>
48 </html>