OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |