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

Side by Side Diff: Source/core/input/EventHandlerTest.cpp

Issue 1311623004: Make EventHandler to use VisibleSelection::toNormalizedEphemeralRange() instead of toNormalizedRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T17:22:50 Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/input/EventHandler.h" 6 #include "core/input/EventHandler.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Range.h" 9 #include "core/dom/Range.h"
10 #include "core/editing/FrameSelection.h" 10 #include "core/editing/FrameSelection.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 IntPoint(200, 250), 85 IntPoint(200, 250),
86 LeftButton, 86 LeftButton,
87 PlatformEvent::MouseReleased, 87 PlatformEvent::MouseReleased,
88 1, 88 1,
89 static_cast<PlatformEvent::Modifiers>(0), 89 static_cast<PlatformEvent::Modifiers>(0),
90 WTF::currentTime()); 90 WTF::currentTime());
91 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent); 91 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent);
92 92
93 FrameSelection& selection = document().frame()->selection(); 93 FrameSelection& selection = document().frame()->selection();
94 ASSERT_TRUE(selection.isRange()); 94 ASSERT_TRUE(selection.isRange());
95 RefPtrWillBeRawPtr<Range> range = selection.toNormalizedRange(); 95 RefPtrWillBeRawPtr<Range> range = createRange(selection.selection().toNormal izedEphemeralRange());
96 ASSERT_TRUE(range.get()); 96 ASSERT_TRUE(range.get());
97 EXPECT_EQ("Line 1\nLine 2", range->text()); 97 EXPECT_EQ("Line 1\nLine 2", range->text());
98 } 98 }
99 99
100 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698