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

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

Issue 662603002: [DevTools] Adjust svg elements highlight to the root FrameView origin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 years, 2 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.html » ('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
1 var initialize_ElementTest = function() { 9 var initialize_ElementTest = function() {
2 10
3 InspectorTest.preloadPanel("elements"); 11 InspectorTest.preloadPanel("elements");
4 12
5 InspectorTest.findNode = function(matchFunction, callback) 13 InspectorTest.findNode = function(matchFunction, callback)
6 { 14 {
7 callback = InspectorTest.safeWrap(callback); 15 callback = InspectorTest.safeWrap(callback);
8 var result = null; 16 var result = null;
9 var pendingRequests = 0; 17 var pendingRequests = 0;
10 function processChildren(node) 18 function processChildren(node)
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 770
763 function onBlankSection(selector, callback) 771 function onBlankSection(selector, callback)
764 { 772 {
765 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2 ]; 773 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2 ];
766 if (typeof selector === "string") 774 if (typeof selector === "string")
767 section._selectorElement.textContent = selector; 775 section._selectorElement.textContent = selector;
768 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") ); 776 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") );
769 InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); 777 InspectorTest.waitForSelectorCommitted(callback.bind(null, section));
770 } 778 }
771 779
772 InspectorTest.dumpInspectorHighlight = function(node, callback) 780 InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameI d)
773 { 781 {
774 node.boxModel(function(boxModel) { 782 function innerCallback(result)
775 var rectNames = ["margin", "border", "padding", "content"]; 783 {
776 for (var i = 0; i < rectNames.length; i++) { 784 InspectorTest.addResult(nodeId + ": " + result.description);
777 var rect = boxModel[rectNames[i]];
778 InspectorTest.addResult(rectNames[i] + " rect is " + (rect[4] - rect [0]) + " x " + (rect[5] - rect[1]) + " at (" + rect[0] + ", " + rect[1] + ")");
779 }
780 callback(); 785 callback();
781 }); 786 }
782 } 787 opt_frameId = opt_frameId || "";
783 788 InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback);
784 InspectorTest.dumpInspectorHighlightShape = function(node, callback)
785 {
786 node.boxModel(function(shapes) {
787 InspectorTest.addResult(JSON.stringify(shapes.shapeOutside.shape));
788 callback();
789 });
790 } 789 }
791 790
792 }; 791 };
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/highlight-css-shapes-outside.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698