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

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

Issue 2708703003: Expand FrameSeleciton::isRange() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T23:48:22 rebase 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 7055cd55802f3595b4fb947da75dfbef1333b336..0d46806846c3bebf8674bf251921985f095e22bf 100644
--- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -134,7 +134,8 @@ TEST_F(EventHandlerTest, dragSelectionAfterScroll) {
mouseUpEvent.setFrameScale(1);
document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent);
- ASSERT_TRUE(selection().isRange());
+ ASSERT_TRUE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
Range* range = createRange(selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.toNormalizedEphemeralRange());
@@ -161,7 +162,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
// like multi-click events.
TapEventBuilder doubleTapEvent(IntPoint(0, 0), 2);
document().frame()->eventHandler().handleGestureEvent(doubleTapEvent);
- ASSERT_TRUE(selection().isRange());
+ ASSERT_TRUE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
EXPECT_EQ(Position(line, 0), selection().start());
if (document().frame()->editor().isSelectTrailingWhitespaceEnabled()) {
EXPECT_EQ(Position(line, 4),
@@ -175,7 +177,8 @@ TEST_F(EventHandlerTest, multiClickSelectionFromTap) {
TapEventBuilder tripleTapEvent(IntPoint(0, 0), 3);
document().frame()->eventHandler().handleGestureEvent(tripleTapEvent);
- ASSERT_TRUE(selection().isRange());
+ ASSERT_TRUE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
EXPECT_EQ(Position(line, 0), selection().start());
EXPECT_EQ(Position(line, 13),
selection().computeVisibleSelectionInDOMTreeDeprecated().end());
@@ -401,7 +404,8 @@ TEST_F(EventHandlerTest, HandleNotShownOnMouseEvents) {
document().frame()->eventHandler().handleMousePressEvent(
doubleClickMousePressEvent);
- ASSERT_TRUE(selection().isRange());
+ ASSERT_TRUE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
ASSERT_FALSE(selection().isHandleVisible());
MousePressEventBuilder tripleClickMousePressEvent(
@@ -409,7 +413,8 @@ TEST_F(EventHandlerTest, HandleNotShownOnMouseEvents) {
document().frame()->eventHandler().handleMousePressEvent(
tripleClickMousePressEvent);
- ASSERT_TRUE(selection().isRange());
+ ASSERT_TRUE(
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange());
ASSERT_FALSE(selection().isHandleVisible());
}
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698