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

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 indentation. 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 InspectorTest.evaluateInConsole("copy('qwerty')"); 9 var testCases = [
10 InspectorFrontendHost.copyText = copyText; 10 "copy('qwerty')",
11 "copy(document.querySelector('p'))",
12 "copy({foo:'bar'})",
13 "var a = {}; a.b = a; copy(a)",
14 "copy(document.all)",
15 "copy(NaN)",
16 "copy(Infinity)",
17 "copy(null)",
18 "copy(undefined)",
19 "copy(1)",
20 "copy(true)",
21 "copy(false)"
22 ];
11 23
12 function copyText(text) { 24 function copyText(text) {
13 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text); 25 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text);
14 InspectorTest.completeTest();
15 } 26 }
27
28 InspectorFrontendHost.copyText = copyText;
29
30 for (var i = 0; i < testCases.length; ++i)
31 RuntimeAgent.evaluate(testCases[i], "", true);
32
33 RuntimeAgent.evaluate("copy(null)", "", true, InspectorTest.completeTest.bin d(InspectorTest));
16 } 34 }
17 35
18 </script> 36 </script>
19 </head> 37 </head>
20 38
21 <body onload="runTest()"> 39 <body onload="runTest()">
22 <p> 40 <p>
23 Tests that console's copy command is copying into front-end buffer. 41 Tests that console's copy command is copying into front-end buffer.
24 </p> 42 </p>
25 43
26 </body> 44 </body>
27 </html> 45 </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