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

Unified Diff: LayoutTests/inspector/layers/layer-scroll-rects-update.html

Issue 166273018: Added showing slow scroll rectangles in Layers panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes. 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/layer-scroll-rects-update.html
diff --git a/LayoutTests/inspector/layers/layer-scroll-rects-update.html b/LayoutTests/inspector/layers/layer-scroll-rects-update.html
new file mode 100644
index 0000000000000000000000000000000000000000..d75d9c0c4817b1cdb3178a253d675dc0f0f49277
--- /dev/null
+++ b/LayoutTests/inspector/layers/layer-scroll-rects-update.html
@@ -0,0 +1,69 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/layers-test.js"></script>
+<script>
+function test()
+{
+ var layers = [
+ {
+ layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0
+ },
+ {
+ layerId: "2", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0, parentLayerId: "1", scrollRects: [
+ { rect: {x: 0, y: 10, width: 10, height: 10}, type: "RepaintsOnScroll", unchanged: true }
+ ]
+ },
+ {
+ layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "2", nodeId: 1,
+ scrollRects: [
+ {rect: {x: 10, y: 10, width: 10, height: 10}, type: "WheelEventHandler", unchanged: true},
+ {rect: {x: 10, y: 0, width: 10, height: 10}, type: "TouchEventHandler", unchanged: true}
+ ]
+ },
+ {
+ layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "3", nodeId: 2, scrollRects: [
+ {rect: {x: 0, y: 0, width: 10, height: 10}, type: "TouchEventHandler", unchanged: true}
+ ]
+ }
+ ];
+ var changedLayers = [
+ {
+ layerId: "1", offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0
+ },
+ {
+ layerId: "3", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "1", nodeId: 1, scrollRects: [
+ {rect: {x: 0, y: 0, width: 10, height: 10}, type: "WheelEventHandler"},
+ {rect: {x: 10, y: 0, width: 10, height: 10}, type: "TouchEventHandler"}
+ ]
+ },
+ {
+ layerId: "4", offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: "3", nodeId: 2, scrollRects: [
+ {rect: {x: 0, y: 0, width: 10, height: 10}, type: "TouchEventHandler"}
+ ]
+ }
+ ];
+
+ function onGotLayers()
+ {
+ InspectorTest.addResult("Initial scroll rectangles");
+ InspectorTest._layerTreeModel._layerTreeChanged(layers);
+ InspectorTest.dumpViewScrollRects();
+ InspectorTest.dumpModelScrollRects();
+
+ InspectorTest.addResult("Updated scroll rectangles");
+ InspectorTest._layerTreeModel._layerTreeChanged(changedLayers);
+ InspectorTest.dumpViewScrollRects();
+ InspectorTest.dumpModelScrollRects();
+
+ InspectorTest.completeTest();
+ }
+
+ WebInspector.showPanel("layers");
+ InspectorTest.requestLayers(onGotLayers);
+}
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698