Index: views/touchui/touch_selection_controller_impl_unittest.cc |
=================================================================== |
--- views/touchui/touch_selection_controller_impl_unittest.cc (revision 103758) |
+++ views/touchui/touch_selection_controller_impl_unittest.cc (working copy) |
@@ -122,7 +122,7 @@ |
textfield_->SetText(ASCIIToUTF16("some text")); |
// Test selecting a range. |
- textfield_->SelectSelectionModel(gfx::SelectionModel(3, 7)); |
+ textfield_->SelectRange(ui::Range(3, 7)); |
VerifySelectionHandlePositions(false); |
// Test selecting everything. |
@@ -153,46 +153,35 @@ |
VerifySelectionHandlePositions(false); |
// Test selection range inside one run and starts or ends at run boundary. |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(2, 3, 2, gfx::SelectionModel::TRAILING)); |
+ textfield_->SelectRange(ui::Range(2, 3)); |
VerifySelectionHandlePositions(false); |
- // TODO(xji): change to textfield_->SelectRange(3, 2). |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(3, 2, 2, gfx::SelectionModel::LEADING)); |
+ textfield_->SelectRange(ui::Range(3, 2)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(3, 4, 3, gfx::SelectionModel::TRAILING)); |
+ textfield_->SelectRange(ui::Range(3, 4)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(4, 3, 3, gfx::SelectionModel::LEADING)); |
+ textfield_->SelectRange(ui::Range(4, 3)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(3, 6, 5, gfx::SelectionModel::TRAILING)); |
+ textfield_->SelectRange(ui::Range(3, 6)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(6, 3, 3, gfx::SelectionModel::LEADING)); |
+ textfield_->SelectRange(ui::Range(6, 3)); |
VerifySelectionHandlePositions(false); |
// Test selection range accross runs. |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(0, 6, 5, gfx::SelectionModel::TRAILING)); |
+ textfield_->SelectRange(ui::Range(0, 6)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(6, 0, 0, gfx::SelectionModel::LEADING)); |
+ textfield_->SelectRange(ui::Range(6, 0)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(1, 4, 3, gfx::SelectionModel::TRAILING)); |
+ textfield_->SelectRange(ui::Range(1, 4)); |
VerifySelectionHandlePositions(false); |
- textfield_->SelectSelectionModel( |
- gfx::SelectionModel(4, 1, 1, gfx::SelectionModel::LEADING)); |
+ textfield_->SelectRange(ui::Range(4, 1)); |
VerifySelectionHandlePositions(false); |
} |
@@ -201,7 +190,7 @@ |
TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) { |
CreateTextfield(); |
textfield_->SetText(ASCIIToUTF16("textfield with selected text")); |
- textfield_->SelectSelectionModel(gfx::SelectionModel(3, 7)); |
+ textfield_->SelectRange(ui::Range(3, 7)); |
EXPECT_EQ(UTF16ToUTF8(textfield_->GetSelectedText()), "tfie"); |
VerifySelectionHandlePositions(false); |