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

Unified Diff: third_party/WebKit/Source/core/input/EventHandlerTest.cpp

Issue 2703313002: Expand FrameSeleciton::end() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T12:26:29 Created 3 years, 10 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/Source/core/input/EventHandlerTest.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
index f2646b81383d95a16de6278b3eefabff8c681747..50cf6d81f2d1c4d42da7c0f579fa01216c0df01b 100644
--- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -163,10 +163,12 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
ASSERT_TRUE(selection().isRange());
EXPECT_EQ(Position(line, 0), selection().start());
if (document().frame()->editor().isSelectTrailingWhitespaceEnabled()) {
- EXPECT_EQ(Position(line, 4), selection().end());
+ EXPECT_EQ(Position(line, 4),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().end());
EXPECT_EQ("One ", WebString(selection().selectedText()).utf8());
} else {
- EXPECT_EQ(Position(line, 3), selection().end());
+ EXPECT_EQ(Position(line, 3),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().end());
EXPECT_EQ("One", WebString(selection().selectedText()).utf8());
}
@@ -174,7 +176,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
document().frame()->eventHandler().handleGestureEvent(tripleTapEvent);
ASSERT_TRUE(selection().isRange());
EXPECT_EQ(Position(line, 0), selection().start());
- EXPECT_EQ(Position(line, 13), selection().end());
+ EXPECT_EQ(Position(line, 13),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().end());
EXPECT_EQ("One Two Three", WebString(selection().selectedText()).utf8());
}

Powered by Google App Engine
This is Rietveld 408576698