| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/console-test.js"></script> |
| <script> |
| function prepareForTest() |
| { |
| var anObject = { |
| foo: 1, |
| bar: "string" |
| }; |
| console.log(anObject); |
| runTest(); |
| } |
| //# sourceURL=console-copy-treeoutline.html |
| </script> |
| |
| <script> |
| function test() |
| { |
| InspectorTest.fixConsoleViewportDimensions(600, 200); |
| var consoleView = Console.ConsoleView.instance(); |
| var viewport = consoleView._viewport; |
| |
| InspectorTest.runTestSuite([ |
| function testSelectAll(next) |
| { |
| viewport.forceScrollItemToBeFirst(0); |
| |
| // Set some initial selection in console. |
| var base = consoleView.itemElement(0).element(); |
| window.getSelection().setBaseAndExtent(base, 0, base, 1); |
| |
| // Try to select all messages. |
| document.execCommand("selectAll"); |
| |
| var text = viewport._selectedText(); |
| InspectorTest.addResult("Selected text: " + text); |
| next(); |
| } |
| ]); |
| } |
| </script> |
| </head> |
| <body onload="prepareForTest()"> |
| <p>Tests that console copies tree outline messages properly.</p> |
| </body> |
| </html> |