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

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

Issue 2644753002: DevTools: untruncate links on copy (Closed)
Patch Set: ac Created 3 years, 8 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
Index: third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html b/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
index 83909bd6f1cfabe456ce40d4bc76d8cdf395b10d..f6a6e66ef53d1b59019d67ff3fa9467e3ef6a3ff 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
@@ -259,23 +259,6 @@ function test()
viewport.refresh();
}
- function selectionContainerAndOffset(container, offset)
- {
- var charCount = 0;
- var node = container;
- while (node = node.traverseNextTextNode(true)) {
- var length = node.textContent.length;
- if (charCount + length >= offset) {
- return {
- container: node,
- offset: offset - charCount
- };
- }
- charCount += length;
- }
- return null;
- }
-
function selectMessages(fromMessage, fromTextOffset, toMessage, toTextOffset)
{
if (Math.abs(toMessage - fromMessage) > minimumViewportMessagesCount) {
@@ -285,9 +268,7 @@ function test()
}
viewport.forceScrollItemToBeFirst(Math.min(fromMessage, toMessage));
- var from = selectionContainerAndOffset(consoleView.itemElement(fromMessage).element(), fromTextOffset);
- var to = selectionContainerAndOffset(consoleView.itemElement(toMessage).element(), toTextOffset);
- window.getSelection().setBaseAndExtent(from.container, from.offset, to.container, to.offset);
+ InspectorTest.selectConsoleMessages(fromMessage, fromTextOffset, toMessage, toTextOffset);
viewport.refresh();
}
}

Powered by Google App Engine
This is Rietveld 408576698