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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-command-copy-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var pendingCount = 9;
10 InspectorFrontendHost.copyText = copyText;
11
9 InspectorTest.evaluateInConsole("copy('qwerty')"); 12 InspectorTest.evaluateInConsole("copy('qwerty')");
10 InspectorFrontendHost.copyText = copyText; 13 InspectorTest.evaluateInConsole("copy(document.querySelector('p'))");
11 14 InspectorTest.evaluateInConsole("copy({foo:'bar'})");
15 // Check cyclic references in objects
16 InspectorTest.evaluateInConsole("var a = {}; a.b = a; copy(a)");
17 InspectorTest.evaluateInConsole("copy(document.all)");
18 InspectorTest.evaluateInConsole("copy(NaN)");
19 InspectorTest.evaluateInConsole("copy(Infinity)");
20 InspectorTest.evaluateInConsole("copy(null)");
21 InspectorTest.evaluateInConsole("copy(undefined)");
22 InspectorTest.evaluateInConsole("copy(1)");
23 InspectorTest.evaluateInConsole("copy(true)");
24 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.
25
12 function copyText(text) { 26 function copyText(text) {
13 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text); 27 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text);
14 InspectorTest.completeTest(); 28 if (--pendingCount === 0)
29 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
15 } 30 }
16 } 31 }
17 32
18 </script> 33 </script>
19 </head> 34 </head>
20 35
21 <body onload="runTest()"> 36 <body onload="runTest()">
22 <p> 37 <p>
23 Tests that console's copy command is copying into front-end buffer. 38 Tests that console's copy command is copying into front-end buffer.
24 </p> 39 </p>
25 40
26 </body> 41 </body>
27 </html> 42 </html>
OLDNEW
« 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