Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / console / console-copy-treeoutline.html
blobe6e7706582f5459536aa10578ef7267dad7ccc6a
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 function prepareForTest()
8 var anObject = {
9 foo: 1,
10 bar: "string"
12 console.log(anObject);
13 runTest();
15 //# sourceURL=console-copy-treeoutline.html
16 </script>
18 <script>
19 function test()
21 InspectorTest.fixConsoleViewportDimensions(600, 200);
22 var consoleView = WebInspector.ConsolePanel._view();
23 var viewport = consoleView._viewport;
25 InspectorTest.runTestSuite([
26 function testSelectAll(next)
28 viewport.forceScrollItemToBeFirst(0);
30 // Set some initial selection in console.
31 var base = consoleView.itemElement(0);
32 window.getSelection().setBaseAndExtent(base, 0, base, 1);
34 // Try to select all messages.
35 document.execCommand("selectAll");
37 var text = viewport._selectedText();
38 InspectorTest.addResult("Selected text: " + text);
39 next();
41 ]);
43 </script>
44 </head>
45 <body onload="prepareForTest()">
46 <p>Tests that console copies tree outline messages properly.</p>
47 </body>
48 </html>