Index: LayoutTests/inspector/layers/no-overlay-layers.html |
diff --git a/LayoutTests/inspector/layers/no-overlay-layers.html b/LayoutTests/inspector/layers/no-overlay-layers.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ce5ec1f958bfb9d8f5e37177fd01bed6fe543c63 |
--- /dev/null |
+++ b/LayoutTests/inspector/layers/no-overlay-layers.html |
@@ -0,0 +1,51 @@ |
+<html> |
+<head> |
+<style> |
+.layer { |
+ -webkit-transform: translateZ(10px); |
+ opacity: 0.8; |
+} |
+</style> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../http/tests/inspector/layers-test.js"></script> |
+<script> |
+window.quietUntilDone = true; |
+ |
+function updateGeometry() |
+{ |
+ document.getElementById("a").style.width = "300px"; |
+} |
+ |
+function test() |
+{ |
+ var layersBeforeHighlight = []; |
+ |
+ InspectorTest.requestLayers(step1); |
+ |
+ function step1() |
+ { |
+ // Assure layer objects are not re-created during updates. |
+ InspectorTest._layerTreeModel.forEachLayer(function(layer) { layersBeforeHighlight.push(layer.id()); }); |
+ DOMAgent.highlightRect(0, 0, 200, 200, {r:255, g:0, b:0}); |
+ InspectorTest.evaluateAndRunWhenTreeChanges("requestAnimationFrame(updateGeometry)", step2); |
+ } |
+ |
+ function step2() |
+ { |
+ var layersAfterHighlight = []; |
+ InspectorTest._layerTreeModel.forEachLayer(function(layer) { layersAfterHighlight.push(layer.id()); }); |
+ layersBeforeHighlight.sort(); |
+ layersAfterHighlight.sort(); |
+ InspectorTest.assertEquals(JSON.stringify(layersBeforeHighlight), JSON.stringify(layersAfterHighlight)); |
+ InspectorTest.addResult("DONE"); |
+ InspectorTest.completeTest(); |
+ } |
+} |
+ |
+</script> |
+</head> |
+<body onload="runTest()"> |
+<div id="a" style="width: 200px; height: 200px" class="layer"> |
+</div> |
+</body> |
+</html> |