Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / layers / no-overlay-layers.html
blob46806775a41d9cef11563bda66ac144b100ef897
1 <html>
2 <head>
3 <style>
4 .layer {
5 transform: translateZ(10px);
6 opacity: 0.8;
8 </style>
9 <script src="../../http/tests/inspector/inspector-test.js"></script>
10 <script src="../../http/tests/inspector/layers-test.js"></script>
11 <script>
13 function updateGeometry()
15 document.getElementById("a").style.width = "300px";
18 function test()
20 var layersBeforeHighlight = [];
22 InspectorTest.requestLayers(step1);
24 function step1()
26 // Assure layer objects are not re-created during updates.
27 InspectorTest.layerTreeModel.layerTree().forEachLayer(function(layer) { layersBeforeHighlight.push(layer.id()); });
28 InspectorTest.DOMAgent.highlightRect(0, 0, 200, 200, {r:255, g:0, b:0});
29 InspectorTest.evaluateAndRunWhenTreeChanges("requestAnimationFrame(updateGeometry)", step2);
32 function step2()
34 var layersAfterHighlight = [];
35 InspectorTest.layerTreeModel.layerTree().forEachLayer(function(layer) { layersAfterHighlight.push(layer.id()); });
36 layersBeforeHighlight.sort();
37 layersAfterHighlight.sort();
38 InspectorTest.assertEquals(JSON.stringify(layersBeforeHighlight), JSON.stringify(layersAfterHighlight));
39 InspectorTest.addResult("DONE");
40 InspectorTest.completeTest();
44 </script>
45 </head>
46 <body onload="runTest()">
47 <div id="a" style="width: 200px; height: 200px" class="layer">
48 </div>
49 </body>
50 </html>