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

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

Issue 2702403004: Expand FrameSeleciton::start() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T12:32:36 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 0d46806846c3bebf8674bf251921985f095e22bf..29f825c94daa0f5591b4d6f5a2a38124eb46a991 100644
--- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -156,7 +156,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
document().frame()->eventHandler().handleGestureEvent(singleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isCaret());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
// Multi-tap events on editable elements should trigger selection, just
// like multi-click events.
@@ -164,7 +165,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
document().frame()->eventHandler().handleGestureEvent(doubleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
if (document().frame()->editor().isSelectTrailingWhitespaceEnabled()) {
EXPECT_EQ(Position(line, 4),
selection().computeVisibleSelectionInDOMTreeDeprecated().end());
@@ -179,7 +181,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
document().frame()->eventHandler().handleGestureEvent(tripleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
EXPECT_EQ(Position(line, 13),
selection().computeVisibleSelectionInDOMTreeDeprecated().end());
EXPECT_EQ("One Two Three", WebString(selection().selectedText()).utf8());
@@ -197,20 +200,23 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTapDisabledIfNotEditable) {
document().frame()->eventHandler().handleGestureEvent(singleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isCaret());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
// As the text is readonly, multi-tap events should not trigger selection.
TapEventBuilder doubleTapEvent(IntPoint(0, 0), 2);
document().frame()->eventHandler().handleGestureEvent(doubleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isCaret());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
TapEventBuilder tripleTapEvent(IntPoint(0, 0), 3);
document().frame()->eventHandler().handleGestureEvent(tripleTapEvent);
ASSERT_TRUE(
selection().computeVisibleSelectionInDOMTreeDeprecated().isCaret());
- EXPECT_EQ(Position(line, 0), selection().start());
+ EXPECT_EQ(Position(line, 0),
+ selection().computeVisibleSelectionInDOMTreeDeprecated().start());
}
TEST_F(EventHandlerTest, draggedInlinePositionTest) {

Powered by Google App Engine
This is Rietveld 408576698