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

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

Issue 177653004: DevTools: Get rid of redundant default selection during inspectElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master 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
OLDNEW
1 var initialize_ElementTest = function() { 1 var initialize_ElementTest = function() {
2 2
3 InspectorTest.findNode = function(matchFunction, callback) 3 InspectorTest.findNode = function(matchFunction, callback)
4 { 4 {
5 callback = InspectorTest.safeWrap(callback); 5 callback = InspectorTest.safeWrap(callback);
6 var result = null; 6 var result = null;
7 var pendingRequests = 0; 7 var pendingRequests = 0;
8 function processChildren(node) 8 function processChildren(node)
9 { 9 {
10 try { 10 try {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 InspectorTest.nodeWithId(idValue, callback); 62 InspectorTest.nodeWithId(idValue, callback);
63 return result; 63 return result;
64 } 64 }
65 65
66 InspectorTest.selectNodeWithId = function(idValue, callback) 66 InspectorTest.selectNodeWithId = function(idValue, callback)
67 { 67 {
68 callback = InspectorTest.safeWrap(callback); 68 callback = InspectorTest.safeWrap(callback);
69 function onNodeFound(node) 69 function onNodeFound(node)
70 { 70 {
71 if (node) 71 WebInspector.Revealer.reveal(node);
72 WebInspector._updateFocusedNode(node.id);
73 callback(node); 72 callback(node);
74 } 73 }
75 InspectorTest.nodeWithId(idValue, onNodeFound); 74 InspectorTest.nodeWithId(idValue, onNodeFound);
76 } 75 }
77 76
78 InspectorTest.waitForStyles = function(idValue, callback, requireRebuild) 77 InspectorTest.waitForStyles = function(idValue, callback, requireRebuild)
79 { 78 {
80 callback = InspectorTest.safeWrap(callback); 79 callback = InspectorTest.safeWrap(callback);
81 80
82 (function sniff(node, rebuild) 81 (function sniff(node, rebuild)
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 { 674 {
676 var rectNames = ["margin", "border", "padding", "content"]; 675 var rectNames = ["margin", "border", "padding", "content"];
677 var rects = window.internals.inspectorHighlightRects(document); 676 var rects = window.internals.inspectorHighlightRects(document);
678 for (var i = 0; i < rects.length; i++) 677 for (var i = 0; i < rects.length; i++)
679 { 678 {
680 var rectName = (i < rectNames.length ? rectNames[i] : "untitled"); 679 var rectName = (i < rectNames.length ? rectNames[i] : "untitled");
681 var rect = rects.item(i); 680 var rect = rects.item(i);
682 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")"); 681 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
683 } 682 }
684 } 683 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698