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

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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/highlight-css-shapes-outside.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c67ce1a85556005b2465c89397bff4ef27e0df6c 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -1,3 +1,11 @@
+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");
@@ -769,24 +777,15 @@ function onBlankSection(selector, callback)
InspectorTest.waitForSelectorCommitted(callback.bind(null, section));
}
-InspectorTest.dumpInspectorHighlight = function(node, callback)
-{
- 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)
+InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameId)
{
- node.boxModel(function(shapes) {
- InspectorTest.addResult(JSON.stringify(shapes.shapeOutside.shape));
+ function innerCallback(result)
+ {
+ InspectorTest.addResult(nodeId + ": " + result.description);
callback();
- });
+ }
+ opt_frameId = opt_frameId || "";
+ InspectorTest.evaluateInPage("getInspectorHighlightJSON(\"" + nodeId + "\", \"" + opt_frameId + "\")", innerCallback);
}
};
« 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