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

Side by Side Diff: LayoutTests/inspector/layer-scroll-rects.html

Issue 166273018: Added showing slow scroll rectangles in Layers panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="../http/tests/inspector/layers-test.js"></script>
5 <script>
6 function test()
7 {
8 var layers = [
9 {layerId: 1, offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0} ,
caseq 2014/02/24 07:18:06 please make layerIds strings to match the protocol
malch 2014/02/24 13:59:15 Done.
10 {layerId: 2, offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0, parentLayerId: 1},
11 {layerId: 3, offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: 2, nodeId: 1}
12 ];
13 var changedLayers = [
14 {layerId: 1, offsetX: 0, offsetY: 0, width: 0, height: 0, paintCount: 0} ,
15 {layerId: 3, offsetX: 0, offsetY: 0, width: 50, height: 50, paintCount: 0, parentLayerId: 1, nodeId: 1}
16 ];
17 var scrollRects = [
18 {layerId: 3, x: 10, y: 10, width: 10, height: 10, type: "WheelEventHandl er", unchanged: true},
caseq 2014/02/24 07:18:06 unchanged?
malch 2014/02/24 13:59:15 Done.
19 {layerId: 2, x: 0, y: 10, width: 10, height: 10, type: "RepaintsOnScroll ", unchanged: true},
20 {layerId: 3, x: 10, y: 0, width: 10, height: 10, type: "TouchEventHandle r", unchanged: true}
21 ];
22 var changedScrollRects = [
23 {layerId: 3, x: 0, y: 0, width: 10, height: 10, type: "WheelEventHandler "},
24 {layerId: 3, x: 10, y: 0, width: 10, height: 10, type: "TouchEventHandle r"}
25 ];
26
27 function dumpScrollRect(element)
28 {
29 InspectorTest.addResult("scrollRect: " + JSON.stringify(element.__scroll Rect));
30 }
31
32 function dumpViewScrollRects()
33 {
34 InspectorTest.addResult("View elements dump");
35 var root = WebInspector.panel("layers")._layers3DView._rotatingContainer Element;
36 var layerElement = root.firstElementChild;
37 for (var element = layerElement.firstElementChild; element; element = el ement.nextSibling) {
caseq 2014/02/24 07:18:06 This does not seem to recurse into sub-layers.
malch 2014/02/24 13:59:15 Done.
38 if (element.className !== "scroll-rect")
caseq 2014/02/24 07:18:06 Use root.querySelectorAll(".scroll-rect")
malch 2014/02/24 13:59:15 Done.
39 continue;
40 dumpScrollRect(element);
41 }
42 }
43
44 function dumpModelScrollRects()
45 {
46 InspectorTest.addResult("Model elements dump");
47 InspectorTest.addResult("scrollRectsByLayerId: " + JSON.stringify(Inspec torTest._layerTreeModel._scrollRectsByLayerId));
48 }
49
50 function onGotLayers()
51 {
52 InspectorTest.addResult("First dump");
caseq 2014/02/24 07:18:06 "Initial scroll rectangles"
malch 2014/02/24 13:59:15 Done.
53 InspectorTest._layerTreeModel._layerTreeChanged(layers, scrollRects);
54 dumpViewScrollRects();
55 dumpModelScrollRects();
56
57 InspectorTest.addResult("Second dump");
caseq 2014/02/24 07:18:06 "Updated scroll rectangles"
malch 2014/02/24 13:59:15 Done.
58 InspectorTest._layerTreeModel._layerTreeChanged(changedLayers, changedSc rollRects);
59 dumpViewScrollRects();
60 dumpModelScrollRects();
61
62 InspectorTest.completeTest();
63 }
64
65 WebInspector.showPanel("layers");
66 InspectorTest.requestLayers(onGotLayers);
67 }
68 </script>
69 </head>
70 <body onload="runTest()">
71 </body>
72 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/layer-scroll-rects-expected.txt » ('j') | Source/devtools/front_end/LayerTreeModel.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698