Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: LayoutTests/inspector/layers/no-overlay-layers.html

Issue 173763002: DevTools: hide page overlay layers in LayerTreeAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed stray watchdog from test Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698