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

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

Issue 900903002: DevTools: do not use Internals for inspector highlight tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comment addressed. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/highlight-css-shapes-outside-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
880 }
881
882 function report(error, result)
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 };
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/highlight-css-shapes-outside-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698