1<!DOCTYPE html>
2<html>
3<head>
4 <style type="text/css" media="screen">
5 .composited {
6 -webkit-transform: translateZ(0);
7 }
8 </style>
9 <script>
10 if (window.layoutTestController) {
11 layoutTestController.overridePreference("WebKitWebGLEnabled", "1");
12 layoutTestController.waitUntilDone();
13 layoutTestController.dumpAsText(true);
14 }
15
16 window.setTimeout(function() {
17 var c = document.getElementById("c");
18 // On some platforms the fetching of the WebGL context will
19 // force a switch from the integrated to the discrete GPU
20 // and the loss of the compositor's context.
21 var gl = c.getContext("experimental-webgl");
22 gl.clearColor(0, 1, 0, 1);
23 gl.clear(gl.COLOR_BUFFER_BIT);
24 if (window.layoutTestController) {
25 window.setTimeout(function() {
26 window.layoutTestController.notifyDone();
27 }, 0);
28 }
29 }, 0);
30 </script>
31</head>
32<body>
33 <div id="target" class="composited">
34 </div>
35 <div>
36 <canvas id="c" width="100" height="100">
37 </canvas>
38 </div>
39</body>
40</html>