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

Unified Diff: LayoutTests/inspector/console/console-command-copy.html

Issue 102433002: [DevTools] Improved console.copy command to handle JSON.stringifyable objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed cornercases. Added more tests. 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-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-command-copy.html
diff --git a/LayoutTests/inspector/console/console-command-copy.html b/LayoutTests/inspector/console/console-command-copy.html
index 6e21c2a9e3ef883914355d7d82ef964939f6c97d..fc116c4c95f5186a39aa04fb1c296d1fce009e84 100644
--- a/LayoutTests/inspector/console/console-command-copy.html
+++ b/LayoutTests/inspector/console/console-command-copy.html
@@ -6,12 +6,27 @@
function test()
{
- InspectorTest.evaluateInConsole("copy('qwerty')");
+ var pendingCount = 9;
InspectorFrontendHost.copyText = copyText;
-
+
+ InspectorTest.evaluateInConsole("copy('qwerty')");
+ InspectorTest.evaluateInConsole("copy(document.querySelector('p'))");
+ InspectorTest.evaluateInConsole("copy({foo:'bar'})");
+ // Check cyclic references in objects
+ InspectorTest.evaluateInConsole("var a = {}; a.b = a; copy(a)");
+ InspectorTest.evaluateInConsole("copy(document.all)");
+ InspectorTest.evaluateInConsole("copy(NaN)");
+ InspectorTest.evaluateInConsole("copy(Infinity)");
+ InspectorTest.evaluateInConsole("copy(null)");
+ InspectorTest.evaluateInConsole("copy(undefined)");
+ InspectorTest.evaluateInConsole("copy(1)");
+ InspectorTest.evaluateInConsole("copy(true)");
+ InspectorTest.evaluateInConsole("copy(false)");
aandrey 2013/12/04 11:45:31 could you also add smth like: InspectorTest.evalu
Dmitry Zvorygin 2013/12/04 16:00:40 Done.
+
function copyText(text) {
InspectorTest.addResult("InspectorFrontendHost.copyText: " + text);
- InspectorTest.completeTest();
+ if (--pendingCount === 0)
+ InspectorTest.completeTest();
pfeldman 2013/12/04 11:48:56 Just place this into the callback of evaluateInCon
Dmitry Zvorygin 2013/12/04 16:00:40 Seems copy is kind of async operation and can be p
}
}
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-command-copy-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698