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

Unified 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: Testing 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 side-by-side diff with in-line comments
Download patch
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.
}
};

Powered by Google App Engine
This is Rietveld 408576698