diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-06 20:01:51 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-06 20:01:51 +0000 |
commit | db4fc1e2a877bb9d6871274af4e75180856f7560 (patch) | |
tree | a9cd4ded0f732aa44d13f00aae9af16a8b713e35 /ui/views/touchui/touch_selection_controller_impl_unittest.cc | |
parent | 02ee41de4ba8501e5f9a202978f0749264e1247e (diff) | |
download | chromium_src-db4fc1e2a877bb9d6871274af4e75180856f7560.zip chromium_src-db4fc1e2a877bb9d6871274af4e75180856f7560.tar.gz chromium_src-db4fc1e2a877bb9d6871274af4e75180856f7560.tar.bz2 |
Move Range code to gfx.
Part of a set of changes to fix the circular dependency between ui/base and ui/gfx, with the aim of making gfx its own component.
R=jam@chromium.org, jschuh@chromium.org, rsesek@chromium.org
BUG=285385,103304
Review URL: https://codereview.chromium.org/24012002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/touchui/touch_selection_controller_impl_unittest.cc')
-rw-r--r-- | ui/views/touchui/touch_selection_controller_impl_unittest.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc index 2925046..54c9972 100644 --- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc +++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc @@ -200,7 +200,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInTextfieldTest) { textfield_view_->OnGestureEvent(&tap); // Test selecting a range. - textfield_->SelectRange(ui::Range(3, 7)); + textfield_->SelectRange(gfx::Range(3, 7)); VERIFY_HANDLE_POSITIONS(false); // Test selecting everything. @@ -237,35 +237,35 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInBidiTextfieldTest) { VERIFY_HANDLE_POSITIONS(false); // Test selection range inside one run and starts or ends at run boundary. - textfield_->SelectRange(ui::Range(2, 3)); + textfield_->SelectRange(gfx::Range(2, 3)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(3, 2)); + textfield_->SelectRange(gfx::Range(3, 2)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(3, 4)); + textfield_->SelectRange(gfx::Range(3, 4)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(4, 3)); + textfield_->SelectRange(gfx::Range(4, 3)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(3, 6)); + textfield_->SelectRange(gfx::Range(3, 6)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(6, 3)); + textfield_->SelectRange(gfx::Range(6, 3)); VERIFY_HANDLE_POSITIONS(false); // Test selection range accross runs. - textfield_->SelectRange(ui::Range(0, 6)); + textfield_->SelectRange(gfx::Range(0, 6)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(6, 0)); + textfield_->SelectRange(gfx::Range(6, 0)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(1, 4)); + textfield_->SelectRange(gfx::Range(1, 4)); VERIFY_HANDLE_POSITIONS(false); - textfield_->SelectRange(ui::Range(4, 1)); + textfield_->SelectRange(gfx::Range(4, 1)); VERIFY_HANDLE_POSITIONS(false); } @@ -278,7 +278,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) { ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0); textfield_view_->OnGestureEvent(&tap); - textfield_->SelectRange(ui::Range(3, 7)); + textfield_->SelectRange(gfx::Range(3, 7)); EXPECT_EQ(UTF16ToUTF8(textfield_->GetSelectedText()), "tfie"); VERIFY_HANDLE_POSITIONS(false); @@ -318,7 +318,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { textfield_view_->OnGestureEvent(&tap); // Select [c] from left to right. - textfield_->SelectRange(ui::Range(2, 3)); + textfield_->SelectRange(gfx::Range(2, 3)); EXPECT_EQ(WideToUTF16(L"c"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -336,7 +336,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { VERIFY_HANDLE_POSITIONS(true); // Select [c] from right to left. - textfield_->SelectRange(ui::Range(3, 2)); + textfield_->SelectRange(gfx::Range(3, 2)); EXPECT_EQ(WideToUTF16(L"c"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -353,7 +353,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { VERIFY_HANDLE_POSITIONS(false); // Select [\x5e1] from right to left. - textfield_->SelectRange(ui::Range(3, 4)); + textfield_->SelectRange(gfx::Range(3, 4)); EXPECT_EQ(WideToUTF16(L"\x05e1"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -379,7 +379,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { VERIFY_HANDLE_POSITIONS(true); // Select [\x5e1] from left to right. - textfield_->SelectRange(ui::Range(4, 3)); + textfield_->SelectRange(gfx::Range(4, 3)); EXPECT_EQ(WideToUTF16(L"\x05e1"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -398,7 +398,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { VERIFY_HANDLE_POSITIONS(false); // Select [\x05r3] from right to left. - textfield_->SelectRange(ui::Range(5, 6)); + textfield_->SelectRange(gfx::Range(5, 6)); EXPECT_EQ(WideToUTF16(L"\x05e3"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -415,7 +415,7 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { VERIFY_HANDLE_POSITIONS(true); // Select [\x05r3] from left to right. - textfield_->SelectRange(ui::Range(6, 5)); + textfield_->SelectRange(gfx::Range(6, 5)); EXPECT_EQ(WideToUTF16(L"\x05e3"), textfield_->GetSelectedText()); VERIFY_HANDLE_POSITIONS(false); @@ -447,12 +447,12 @@ TEST_F(TouchSelectionControllerImplTest, textfield_view_->OnGestureEvent(&tap); // Select some text such that one handle is hidden. - textfield_->SelectRange(ui::Range(10, textfield_text.length())); + textfield_->SelectRange(gfx::Range(10, textfield_text.length())); // Check that one selection handle is hidden. EXPECT_FALSE(IsSelectionHandle1Visible()); EXPECT_TRUE(IsSelectionHandle2Visible()); - EXPECT_EQ(ui::Range(10, textfield_text.length()), + EXPECT_EQ(gfx::Range(10, textfield_text.length()), textfield_->GetSelectedRange()); // Drag the visible handle around and make sure the selection end point of the |