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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2807693002: Make LogoutButtonTray a regular View (Closed)
Patch Set: Rebased Created 3 years, 8 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index e40369b26c1c9557a6db7adc98de9b0c55db9a79..550c212c1b1b5535a4feb0ce85d99301a68ccb48 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -162,10 +162,10 @@ class ShelfDragCallback {
EXPECT_EQ(auto_hidden_shelf_widget_bounds_.bottom(),
shelf_bounds.bottom());
EXPECT_EQ(shelf_widget_bounds_.bottom(), shelf_bounds.bottom());
- } else if (SHELF_ALIGNMENT_RIGHT == shelf->GetAlignment()) {
+ } else if (SHELF_ALIGNMENT_RIGHT == shelf->alignment()) {
EXPECT_EQ(auto_hidden_shelf_widget_bounds_.right(), shelf_bounds.right());
EXPECT_EQ(shelf_widget_bounds_.right(), shelf_bounds.right());
- } else if (SHELF_ALIGNMENT_LEFT == shelf->GetAlignment()) {
+ } else if (SHELF_ALIGNMENT_LEFT == shelf->alignment()) {
EXPECT_EQ(auto_hidden_shelf_widget_bounds_.x(), shelf_bounds.x());
EXPECT_EQ(shelf_widget_bounds_.x(), shelf_bounds.x());
}
@@ -393,9 +393,9 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
// Swipe down very little. It shouldn't change any state.
if (shelf->IsHorizontalAlignment())
end.set_y(start.y() + shelf_shown.height() * 3 / 10);
- else if (SHELF_ALIGNMENT_LEFT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_LEFT == shelf->alignment())
end.set_x(start.x() - shelf_shown.width() * 3 / 10);
- else if (SHELF_ALIGNMENT_RIGHT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_RIGHT == shelf->alignment())
end.set_x(start.x() + shelf_shown.width() * 3 / 10);
generator.GestureScrollSequence(start, end, kTimeDelta, 5);
EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
@@ -421,10 +421,10 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
gfx::Point extended_start = start;
if (shelf->IsHorizontalAlignment())
extended_start.set_y(GetShelfWidget()->GetWindowBoundsInScreen().y() - 1);
- else if (SHELF_ALIGNMENT_LEFT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_LEFT == shelf->alignment())
extended_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().right() +
1);
- else if (SHELF_ALIGNMENT_RIGHT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_RIGHT == shelf->alignment())
extended_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().x() - 1);
end = extended_start - delta;
generator.GestureScrollSequenceWithCallback(
@@ -470,9 +470,9 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
gfx::Point below_start = start;
if (shelf->IsHorizontalAlignment())
below_start.set_y(GetShelfWidget()->GetWindowBoundsInScreen().bottom() + 1);
- else if (SHELF_ALIGNMENT_LEFT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_LEFT == shelf->alignment())
below_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().x() - 1);
- else if (SHELF_ALIGNMENT_RIGHT == shelf->GetAlignment())
+ else if (SHELF_ALIGNMENT_RIGHT == shelf->alignment())
below_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().right() + 1);
end = below_start - delta;
generator.GestureScrollSequence(below_start, end, kTimeDelta,
@@ -1279,7 +1279,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
display.GetWorkAreaInsets().left());
EXPECT_GE(shelf_bounds.width(),
GetShelfWidget()->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(SHELF_ALIGNMENT_LEFT, GetPrimarySystemTray()->shelf_alignment());
+ EXPECT_EQ(SHELF_ALIGNMENT_LEFT, GetPrimarySystemTray()->shelf()->alignment());
StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget();
gfx::Rect status_bounds(status_area_widget->GetWindowBoundsInScreen());
// TODO(estade): Re-enable this check. See crbug.com/660928.
@@ -1308,7 +1308,8 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
display.GetWorkAreaInsets().right());
EXPECT_GE(shelf_bounds.width(),
GetShelfWidget()->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(SHELF_ALIGNMENT_RIGHT, GetPrimarySystemTray()->shelf_alignment());
+ EXPECT_EQ(SHELF_ALIGNMENT_RIGHT,
+ GetPrimarySystemTray()->shelf()->alignment());
status_bounds = gfx::Rect(status_area_widget->GetWindowBoundsInScreen());
// TODO(estade): Re-enable this check. See crbug.com/660928.
// EXPECT_GE(
« no previous file with comments | « ash/BUILD.gn ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698