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

Unified Diff: ui/views/touchui/touch_selection_controller_impl_unittest.cc

Issue 754963007: Revert of Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/touchui/touch_selection_controller_impl_unittest.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index 8f9d8a674eca1f470acfac62de693020e0a7b056..5d0c6934d2cb0aff4064300e338abb18032c2515 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -46,13 +46,12 @@
// the same location.
int CompareTextSelectionBounds(const ui::SelectionBound& b1,
const ui::SelectionBound& b2) {
- if (b1.edge_top().y() < b2.edge_top().y() ||
- b1.edge_top().x() < b2.edge_top().x()) {
+ if ((b1.edge_top.y() < b2.edge_top.y()) || b1.edge_top.x() < b2.edge_top.x())
return -1;
- }
- if (b1 == b2)
+ else if (b1 == b2)
return 0;
- return 1;
+ else
+ return 1;
}
} // namespace
@@ -259,14 +258,14 @@
}
if (check_direction) {
if (CompareTextSelectionBounds(anchor, focus) < 0) {
- EXPECT_EQ(ui::SelectionBound::LEFT, anchor.type()) << from_str;
- EXPECT_EQ(ui::SelectionBound::RIGHT, focus.type()) << from_str;
+ EXPECT_EQ(ui::SelectionBound::LEFT, anchor.type) << from_str;
+ EXPECT_EQ(ui::SelectionBound::RIGHT, focus.type) << from_str;
} else if (CompareTextSelectionBounds(anchor, focus) > 0) {
- EXPECT_EQ(ui::SelectionBound::LEFT, focus.type()) << from_str;
- EXPECT_EQ(ui::SelectionBound::RIGHT, anchor.type()) << from_str;
+ EXPECT_EQ(ui::SelectionBound::LEFT, focus.type) << from_str;
+ EXPECT_EQ(ui::SelectionBound::RIGHT, anchor.type) << from_str;
} else {
- EXPECT_EQ(ui::SelectionBound::CENTER, focus.type()) << from_str;
- EXPECT_EQ(ui::SelectionBound::CENTER, anchor.type()) << from_str;
+ EXPECT_EQ(ui::SelectionBound::CENTER, focus.type) << from_str;
+ EXPECT_EQ(ui::SelectionBound::CENTER, anchor.type) << from_str;
}
}
}
@@ -614,8 +613,9 @@
}
void set_cursor_rect(const gfx::Rect& cursor_rect) {
- cursor_bound_.SetEdge(cursor_rect.origin(), cursor_rect.bottom_left());
- cursor_bound_.set_type(ui::SelectionBound::Type::CENTER);
+ cursor_bound_.edge_top = cursor_rect.origin();
+ cursor_bound_.edge_bottom = cursor_rect.bottom_left();
+ cursor_bound_.type = ui::SelectionBound::Type::CENTER;
}
~TestTouchEditable() override {}
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698