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

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

Issue 257873002: DevTools: do not use internals for highlight testing, use protocol instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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-node.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 b969a49de0767e9b5c8020b108b176cd7e495b48..01ee5539c2a9ef875ee256b0929b913bcfca60a4 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -735,16 +735,16 @@ InspectorTest.addNewRule = function(selector, callback)
InspectorTest.addSniffer(WebInspector.BlankStylePropertiesSection.prototype, "makeNormal", callback);
}
-};
-
-function dumpInspectorHighlightRects()
+InspectorTest.dumpInspectorHighlight = function(node, callback)
{
- var rectNames = ["margin", "border", "padding", "content"];
- var rects = window.internals.inspectorHighlightRects(document);
- for (var i = 0; i < rects.length; i++)
- {
- var rectName = (i < rectNames.length ? rectNames[i] : "untitled");
- var rect = rects.item(i);
- output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
- }
+ 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();
+ });
}
+
+};
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/highlight-node.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698