| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> |
| 6 |
| 7 function test() |
| 8 { |
| 9 var results = []; |
| 10 var testCases = [ |
| 11 "copy('qwerty')", |
| 12 "copy(document.querySelector('p'))", |
| 13 "copy({foo:'bar'})", |
| 14 "var a = {}; a.b = a; copy(a)", |
| 15 "copy(NaN)", |
| 16 "copy(Infinity)", |
| 17 "copy(null)", |
| 18 "copy(undefined)", |
| 19 "copy(1)", |
| 20 "copy(true)", |
| 21 "copy(false)", |
| 22 "copy(null)" |
| 23 ]; |
| 24 |
| 25 function 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 } |
| 33 } |
| 34 |
| 35 InspectorFrontendHost.copyText = copyText; |
| 36 for (var i = 0; i < testCases.length; ++i) |
| 37 InspectorTest.RuntimeAgent.evaluate(testCases[i], "", true); |
| 38 } |
| 39 |
| 40 </script> |
| 41 </head> |
| 42 |
| 43 <body onload="runTest()"> |
| 44 <p> |
| 45 Tests that console's copy command is copying into front-end buffer. |
| 46 </p> |
| 47 |
| 48 </body> |
| 49 </html> |
| OLD | NEW |