OLD | NEW |
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 = 5; |
| 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 |
12 function copyText(text) { | 19 function copyText(text) { |
13 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text); | 20 InspectorTest.addResult("InspectorFrontendHost.copyText: " + text); |
14 InspectorTest.completeTest(); | 21 if (--pendingCount === 0) |
| 22 InspectorTest.completeTest(); |
15 } | 23 } |
16 } | 24 } |
17 | 25 |
18 </script> | 26 </script> |
19 </head> | 27 </head> |
20 | 28 |
21 <body onload="runTest()"> | 29 <body onload="runTest()"> |
22 <p> | 30 <p> |
23 Tests that console's copy command is copying into front-end buffer. | 31 Tests that console's copy command is copying into front-end buffer. |
24 </p> | 32 </p> |
25 | 33 |
26 </body> | 34 </body> |
27 </html> | 35 </html> |
OLD | NEW |