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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-command-copy.html

Issue 1921413002: [DevTools] Move inspect and copy to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « no previous file | third_party/WebKit/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 results = [];
9 var testCases = [ 10 var testCases = [
10 "copy('qwerty')", 11 "copy('qwerty')",
11 "copy(document.querySelector('p'))", 12 "copy(document.querySelector('p'))",
12 "copy({foo:'bar'})", 13 "copy({foo:'bar'})",
13 "var a = {}; a.b = a; copy(a)", 14 "var a = {}; a.b = a; copy(a)",
14 "copy(document.all)",
15 "copy(NaN)", 15 "copy(NaN)",
16 "copy(Infinity)", 16 "copy(Infinity)",
17 "copy(null)", 17 "copy(null)",
18 "copy(undefined)", 18 "copy(undefined)",
19 "copy(1)", 19 "copy(1)",
20 "copy(true)", 20 "copy(true)",
21 "copy(false)" 21 "copy(false)",
22 "copy(null)"
22 ]; 23 ];
23 24
24 function copyText(text) { 25 function copyText(text) {
25 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text); 26 results.push(text);
27 if (results.length === testCases.length) {
28 results.sort();
29 for (var result of results)
30 InspectorTest.addResult("InspectorFrontendHost.copyText: " + res ult);
31 InspectorTest.completeTest();
32 }
26 } 33 }
27 34
28 InspectorFrontendHost.copyText = copyText; 35 InspectorFrontendHost.copyText = copyText;
29
30 for (var i = 0; i < testCases.length; ++i) 36 for (var i = 0; i < testCases.length; ++i)
31 InspectorTest.RuntimeAgent.evaluate(testCases[i], "", true); 37 InspectorTest.RuntimeAgent.evaluate(testCases[i], "", true);
32
33 InspectorTest.RuntimeAgent.evaluate("copy(null)", "", true, InspectorTest.co mpleteTest.bind(InspectorTest));
34 } 38 }
35 39
36 </script> 40 </script>
37 </head> 41 </head>
38 42
39 <body onload="runTest()"> 43 <body onload="runTest()">
40 <p> 44 <p>
41 Tests that console's copy command is copying into front-end buffer. 45 Tests that console's copy command is copying into front-end buffer.
42 </p> 46 </p>
43 47
44 </body> 48 </body>
45 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-command-copy-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698