Chromium Code Reviews| 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..bb187e2d987a835dd45c84e732ab19f86ef52eee |
| --- /dev/null |
| +++ b/LayoutTests/inspector/layers/no-overlay-layers.html |
| @@ -0,0 +1,52 @@ |
| +<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() |
| +{ |
| + setTimeout(InspectorTest.completeTest.bind(InspectorTest), 3000); |
|
pfeldman
2014/02/20 15:47:22
Please remove.
|
| + 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> |