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 cfd4d2d23a1d4539b6c8b852efd82cbc983a40e4..9b445b78ee30b89d414dfb9abd92ff4dded39ad1 100644 | 
| --- a/LayoutTests/http/tests/inspector/elements-test.js | 
| +++ b/LayoutTests/http/tests/inspector/elements-test.js | 
| @@ -1,11 +1,3 @@ | 
| -function getInspectorHighlightJSON(nodeId, opt_frameId) | 
| -{ | 
| - var doc = document; | 
| - if (opt_frameId) | 
| - doc = document.getElementById(opt_frameId).contentDocument; | 
| - return window.internals.inspectorHighlightJSON(doc.getElementById(nodeId)); | 
| -} | 
| - | 
| var initialize_ElementTest = function() { | 
| InspectorTest.preloadPanel("elements"); | 
| @@ -878,15 +870,20 @@ function onBlankSection(selector, callback) | 
| InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); | 
| } | 
| -InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameId) | 
| +InspectorTest.dumpInspectorHighlightJSON = function(idValue, callback) | 
| { | 
| - function innerCallback(result) | 
| + InspectorTest.nodeWithId(idValue, nodeResolved); | 
| + | 
| + function nodeResolved(node) | 
| + { | 
| + InspectorTest.DOMAgent.getHighlightObjectForTest(node.id, report.bind(null, node.id)); | 
| + } | 
| + | 
| + function report(nodeId, error, result) | 
| 
 
yurys
2015/02/04 15:00:18
You can drop nodeId param
 
 | 
| { | 
| - InspectorTest.addResult(nodeId + ": " + result.description); | 
| + InspectorTest.addResult(idValue + JSON.stringify(result, null, 2)); | 
| callback(); | 
| } | 
| - opt_frameId = opt_frameId || ""; | 
| - InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback); | 
| } | 
| }; |