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

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

Issue 83123002: DevTools: Move DOMNode.appropriateSelectorFor() into DOMPresentationUtil. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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.inspectorView.addPanel(new WebInspector.LayersPanelDescriptor() ); 4 WebInspector.inspectorView.addPanel(new WebInspector.LayersPanelDescriptor() );
5 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model; 5 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model;
6 6
7 InspectorTest.labelForLayer = function(layer) 7 InspectorTest.labelForLayer = function(layer)
8 { 8 {
9 var node = WebInspector.domAgent.nodeForId(layer.nodeIdForSelfOrAncestor ()); 9 var node = WebInspector.domAgent.nodeForId(layer.nodeIdForSelfOrAncestor ());
10 var label = node.appropriateSelectorFor(false); 10 var label = WebInspector.DOMPresentationUtils.appropriateSelectorFor(nod e, false);
11 var height = layer.height(); 11 var height = layer.height();
12 var width = layer.width(); 12 var width = layer.width();
13 if (height <= 200 && width <= 200) 13 if (height <= 200 && width <= 200)
14 label += " " + height + "x" + width; 14 label += " " + height + "x" + width;
15 if (typeof layer.__extraData !== "undefined") 15 if (typeof layer.__extraData !== "undefined")
16 label += " (" + layer.__extraData + ")"; 16 label += " (" + layer.__extraData + ")";
17 return label; 17 return label;
18 } 18 }
19 19
20 InspectorTest.dumpLayerTree = function(prefix, root) 20 InspectorTest.dumpLayerTree = function(prefix, root)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod el.Events.LayerTreeChanged, onLayerTreeChanged); 91 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod el.Events.LayerTreeChanged, onLayerTreeChanged);
92 InspectorTest._layerTreeModel.enable(); 92 InspectorTest._layerTreeModel.enable();
93 function onLayerTreeChanged() 93 function onLayerTreeChanged()
94 { 94 {
95 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); 95 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer TreeModel.Events.LayerTreeChanged, onLayerTreeChanged);
96 callback(); 96 callback();
97 } 97 }
98 } 98 }
99 99
100 } 100 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/inspect-element.html ('k') | LayoutTests/inspector/elements/move-node.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698