Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 function getInspectorHighlightJSON(nodeId, opt_frameId) | |
| 2 { | |
| 3 var doc = document; | |
| 4 if (opt_frameId) | |
| 5 doc = document.getElementById(opt_frameId).contentDocument; | |
| 6 return window.internals.inspectorHighlightJSON(doc.getElementById(nodeId)); | |
| 7 } | |
| 8 | |
| 9 var initialize_ElementTest = function() { | 1 var initialize_ElementTest = function() { |
| 10 | 2 |
| 11 InspectorTest.preloadPanel("elements"); | 3 InspectorTest.preloadPanel("elements"); |
| 12 | 4 |
| 13 InspectorTest.inlineStyleSection = function() | 5 InspectorTest.inlineStyleSection = function() |
| 14 { | 6 { |
| 15 return WebInspector.panels.elements.sidebarPanes.styles.sections[0][0]; | 7 return WebInspector.panels.elements.sidebarPanes.styles.sections[0][0]; |
| 16 } | 8 } |
| 17 | 9 |
| 18 InspectorTest.computedStyleSection = function() | 10 InspectorTest.computedStyleSection = function() |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 871 | 863 |
| 872 function onBlankSection(selector, callback) | 864 function onBlankSection(selector, callback) |
| 873 { | 865 { |
| 874 var section = InspectorTest.firstMatchedStyleSection(); | 866 var section = InspectorTest.firstMatchedStyleSection(); |
| 875 if (typeof selector === "string") | 867 if (typeof selector === "string") |
| 876 section._selectorElement.textContent = selector; | 868 section._selectorElement.textContent = selector; |
| 877 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") ); | 869 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") ); |
| 878 InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); | 870 InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); |
| 879 } | 871 } |
| 880 | 872 |
| 881 InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameI d) | 873 InspectorTest.dumpInspectorHighlightJSON = function(idValue, callback) |
| 882 { | 874 { |
| 883 function innerCallback(result) | 875 InspectorTest.nodeWithId(idValue, nodeResolved); |
| 876 | |
| 877 function nodeResolved(node) | |
| 884 { | 878 { |
| 885 InspectorTest.addResult(nodeId + ": " + result.description); | 879 InspectorTest.DOMAgent.getHighlightObjectForTest(node.id, report.bind(nu ll, node.id)); |
| 880 } | |
| 881 | |
| 882 function report(nodeId, error, result) | |
|
yurys
2015/02/04 15:00:18
You can drop nodeId param
| |
| 883 { | |
| 884 InspectorTest.addResult(idValue + JSON.stringify(result, null, 2)); | |
| 886 callback(); | 885 callback(); |
| 887 } | 886 } |
| 888 opt_frameId = opt_frameId || ""; | |
| 889 InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback); | |
| 890 } | 887 } |
| 891 | 888 |
| 892 }; | 889 }; |
| OLD | NEW |