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

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: More fixes. Added one more 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
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.panel("layers")._model; 9 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model;
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.LayerTreeMod el.Events.LayerTreeChanged, onLayerTreeChanged); 96 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod el.Events.LayerTreeChanged, onLayerTreeChanged);
97 InspectorTest._layerTreeModel.enable(); 97 InspectorTest._layerTreeModel.enable();
98 function onLayerTreeChanged() 98 function onLayerTreeChanged()
99 { 99 {
100 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); 100 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer TreeModel.Events.LayerTreeChanged, onLayerTreeChanged);
101 callback(); 101 callback();
102 } 102 }
103 } 103 }
104
105 InspectorTest.dumpViewScrollRect = function(element)
106 {
107 // InspectorTest.addResult("scrollRect: " + JSON.stringify(element.__scr ollRect));
caseq 2014/02/24 14:38:56 please remove
malch 2014/02/25 10:36:40 Done.
108 InspectorTest.addObject(element.__scrollRect, {layerId: "skip"}, "", "sc rollRect: ");
109 }
110
111 InspectorTest.dumpViewScrollRects = function()
112 {
113 InspectorTest.addResult("View elements dump");
114 var root = WebInspector.panel("layers")._layers3DView._rotatingContainer Element;
115 var scrollRectElements = root.querySelectorAll('.scroll-rect');
116 for (var i = 0, element; element = scrollRectElements[i]; ++i) {
caseq 2014/02/24 14:38:56 scrollRectElements.forEach()?
malch 2014/02/25 10:36:40 https://coderwall.com/p/jcmzxw
117 InspectorTest.dumpViewScrollRect(element);
118 }
119 }
120
121 InspectorTest.dumpModelScrollRects = function()
122 {
123 InspectorTest.addResult("Model elements dump");
124 // InspectorTest.addResult("scrollRectsByLayerId: " + JSON.stringify(Ins pectorTest._layerTreeModel._scrollRectsByLayerId));
caseq 2014/02/24 14:38:56 Please remove.
malch 2014/02/25 10:36:40 Done.
125 InspectorTest.addObject(InspectorTest._layerTreeModel._scrollRectsByLaye rId, {layerId: "skip"}, "", "scrollRectsByLayerId: ");
126 }
104 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698