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

Unified 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: 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 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-expected.txt » ('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 cfd4d2d23a1d4539b6c8b852efd82cbc983a40e4..9b445b78ee30b89d414dfb9abd92ff4dded39ad1 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -1,11 +1,3 @@
-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");
@@ -878,15 +870,20 @@ function onBlankSection(selector, callback)
InspectorTest.waitForSelectorCommitted(callback.bind(null, section));
}
-InspectorTest.dumpInspectorHighlightJSON = function(nodeId, callback, opt_frameId)
+InspectorTest.dumpInspectorHighlightJSON = function(idValue, callback)
{
- function innerCallback(result)
+ InspectorTest.nodeWithId(idValue, nodeResolved);
+
+ function nodeResolved(node)
+ {
+ InspectorTest.DOMAgent.getHighlightObjectForTest(node.id, report.bind(null, node.id));
+ }
+
+ function report(nodeId, error, result)
yurys 2015/02/04 15:00:18 You can drop nodeId param
{
- InspectorTest.addResult(nodeId + ": " + result.description);
+ InspectorTest.addResult(idValue + JSON.stringify(result, null, 2));
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-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698