Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: LayoutTests/inspector/console/console-viewport-selection.html

Issue 564893002: DevTools: [Console] fix selection of all console messages (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-viewport-selection-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-viewport-selection.html
diff --git a/LayoutTests/inspector/console/console-viewport-selection.html b/LayoutTests/inspector/console/console-viewport-selection.html
index ca1a4ead033c2ccb5e3b92ad22f32bbb8a49a010..2837323ce3025d20f4ae043f63ca32536b65e2c4 100644
--- a/LayoutTests/inspector/console/console-viewport-selection.html
+++ b/LayoutTests/inspector/console/console-viewport-selection.html
@@ -162,6 +162,24 @@ function test()
InspectorTest.addResult("Selected text: " + viewport._selectedText());
next();
},
+
+ function testSelectAll(next)
+ {
+ viewport.forceScrollItemToBeFirst(0);
+
+ // Set some initial selection in console.
+ var base = consoleView.itemElement(messagesCount - 2);
+ var extent = consoleView.itemElement(messagesCount - 1);
+ window.getSelection().setBaseAndExtent(base, 0, extent, 0);
+
+ // Try to select all messages.
+ document.execCommand("selectAll");
+
+ var text = viewport._selectedText();
+ var count = text ? text.split("\n").length : 0;
+ InspectorTest.addResult(count === messagesCount ? "Selected all " + count + " messages." : "Selected " + count + " messages instead of " + messagesCount);
+ next();
+ }
];
var awaitingMessagesCount = messagesCount;
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-viewport-selection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698