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

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

Issue 102433002: [DevTools] Improved console.copy command to handle JSON.stringifyable objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments. Created 7 years 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/console/console-command-copy.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/inspector-test.js
diff --git a/LayoutTests/http/tests/inspector/inspector-test.js b/LayoutTests/http/tests/inspector/inspector-test.js
index 35e948c72a732f096bc926b65e8a35e014003cb0..180a27fbc1d6bb809301aea642d587631f213aab 100644
--- a/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/LayoutTests/http/tests/inspector/inspector-test.js
@@ -51,10 +51,14 @@ InspectorTest.evaluateInConsole = function(code, callback)
var event = document.createEvent("KeyboardEvent");
event.initKeyboardEvent("keydown", true, true, null, "Enter", "");
WebInspector.consoleView.prompt.proxyElement.dispatchEvent(event);
- InspectorTest.addConsoleSniffer(
- function(commandResult) {
+ function sniffer(commandResult) {
+ if (commandResult.type === "result")
callback(commandResult.toMessageElement().textContent);
- });
+ else
+ InspectorTest.addConsoleSniffer(sniffer);
pfeldman 2013/12/05 17:29:54 You can't add a sniffer from within sniffer callba
+ }
+
+ InspectorTest.addConsoleSniffer(sniffer);
}
InspectorTest.evaluateInConsoleAndDump = function(code, callback)
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-command-copy.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698