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

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: 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
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..b4e785878bbb247264f53a38e35c20f9a159f2bf 100644
--- a/LayoutTests/inspector/console/console-command-copy.html
+++ b/LayoutTests/inspector/console/console-command-copy.html
@@ -6,12 +6,20 @@
function test()
{
- InspectorTest.evaluateInConsole("copy('qwerty')");
+ var pendingCount = 5;
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)");
+
function copyText(text) {
InspectorTest.addResult("InspectorFrontendHost.copyText: " + text);
- InspectorTest.completeTest();
+ if (--pendingCount === 0)
+ InspectorTest.completeTest();
}
}

Powered by Google App Engine
This is Rietveld 408576698