Chromium Code Reviews| Index: LayoutTests/http/tests/inspector/elements-test.js |
| diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js |
| index 4befacab6cca36d6af93f6c11ded9b1b71dff79c..edabc4d2f634569985643bb57c0930ba38a28257 100644 |
| --- a/LayoutTests/http/tests/inspector/elements-test.js |
| +++ b/LayoutTests/http/tests/inspector/elements-test.js |
| @@ -769,24 +769,15 @@ function onBlankSection(selector, callback) |
| InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); |
| } |
| -InspectorTest.dumpInspectorHighlight = function(node, callback) |
| +InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameId) |
| { |
| - node.boxModel(function(boxModel) { |
| - var rectNames = ["margin", "border", "padding", "content"]; |
| - for (var i = 0; i < rectNames.length; i++) { |
| - var rect = boxModel[rectNames[i]]; |
| - InspectorTest.addResult(rectNames[i] + " rect is " + (rect[4] - rect[0]) + " x " + (rect[5] - rect[1]) + " at (" + rect[0] + ", " + rect[1] + ")"); |
| - } |
| - callback(); |
| - }); |
| -} |
| - |
| -InspectorTest.dumpInspectorHighlightShape = function(node, callback) |
| -{ |
| - node.boxModel(function(shapes) { |
| - InspectorTest.addResult(JSON.stringify(shapes.shapeOutside.shape)); |
| + function innerCallback(result) |
| + { |
| + InspectorTest.addResult(nodeId + ": " + result.description); |
| callback(); |
| - }); |
| + } |
| + var getDocument = opt_frameId ? "document.getElementById(\"" + opt_frameId + "\").contentDocument" : "document"; |
| + InspectorTest.evaluateInPage("window.internals.getInspectorHighlightJSON(" + getDocument + ".getElementById(\"" + nodeId + "\"))", innerCallback); |
|
caseq
2014/10/24 13:31:44
For better readability, please either extract into
dgozman
2014/10/24 14:45:21
Done.
|
| } |
| }; |