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 = 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> |
OLD | NEW |