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

Side by Side Diff: LayoutTests/http/tests/inspector/layers-test.js

Issue 166273018: Added showing slow scroll rectangles in Layers panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test. Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/inspector/layers/layer-scroll-rects-get.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function initialize_LayerTreeTests() 1 function initialize_LayerTreeTests()
2 { 2 {
3 // FIXME: remove once out of experimental. 3 // FIXME: remove once out of experimental.
4 WebInspector.moduleManager.registerModule("layers"); 4 WebInspector.moduleManager.registerModule("layers");
5 var extensions = WebInspector.moduleManager.extensions(WebInspector.Panel).f orEach(function(extension) { 5 var extensions = WebInspector.moduleManager.extensions(WebInspector.Panel).f orEach(function(extension) {
6 if (extension.module().name() === "layers") 6 if (extension.module().name() === "layers")
7 WebInspector.inspectorView.addPanel(new WebInspector.ModuleManagerEx tensionPanelDescriptor(extension)); 7 WebInspector.inspectorView.addPanel(new WebInspector.ModuleManagerEx tensionPanelDescriptor(extension));
8 }); 8 });
9 InspectorTest.layerTreeModel = WebInspector.inspectorView.panel("layers")._m odel; 9 InspectorTest.layerTreeModel = WebInspector.inspectorView.panel("layers")._m odel;
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 InspectorTest.requestLayers = function(callback) 94 InspectorTest.requestLayers = function(callback)
95 { 95 {
96 InspectorTest.layerTreeModel.addEventListener(WebInspector.LayerTreeMode l.Events.LayerTreeChanged, onLayerTreeChanged); 96 InspectorTest.layerTreeModel.addEventListener(WebInspector.LayerTreeMode l.Events.LayerTreeChanged, onLayerTreeChanged);
97 InspectorTest.layerTreeModel.enable(); 97 InspectorTest.layerTreeModel.enable();
98 function onLayerTreeChanged() 98 function onLayerTreeChanged()
99 { 99 {
100 InspectorTest.layerTreeModel.removeEventListener(WebInspector.LayerT reeModel.Events.LayerTreeChanged, onLayerTreeChanged); 100 InspectorTest.layerTreeModel.removeEventListener(WebInspector.LayerT reeModel.Events.LayerTreeChanged, onLayerTreeChanged);
101 callback(); 101 callback();
102 } 102 }
103 } 103 }
104
105 InspectorTest.dumpViewScrollRect = function(element)
106 {
107 var value = {
108 className: element.className,
109 title: element.title,
110 width: element.style.width,
111 height: element.style.height,
112 left: element.style.left,
113 top: element.style.top
114 };
115 if (element.__unchanged)
116 value.__unchanged = element.__unchanged;
117 InspectorTest.addObject(value, null, "", "scroll-rect: ");
118 }
119
120 InspectorTest.dumpViewScrollRects = function()
121 {
122 InspectorTest.addResult("View elements dump");
123 var root = WebInspector.inspectorView.panel("layers")._layers3DView._rot atingContainerElement;
124 Array.prototype.forEach.call(root.querySelectorAll('.scroll-rect'), Insp ectorTest.dumpViewScrollRect.bind(InspectorTest));
125 }
126
127 InspectorTest.dumpModelScrollRects = function()
128 {
129 function dumpScrollRectsForLayer(layer)
130 {
131 InspectorTest.addObject(layer._scrollRects);
132 }
133
134 InspectorTest.addResult("Model elements dump");
135 InspectorTest.layerTreeModel.forEachLayer(dumpScrollRectsForLayer.bind(t his));
136 }
104 } 137 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/layers/layer-scroll-rects-get.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698