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

Side by Side Diff: ash/shelf/shelf_widget_unittest.cc

Issue 2389403003: chromeos: Don't explicitly set system tray visibility during initialization (Closed)
Patch Set: unused var on windows Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/common/shelf/shelf_widget.h" 5 #include "ash/common/shelf/shelf_widget.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/shelf_constants.h" 8 #include "ash/common/shelf/shelf_constants.h"
9 #include "ash/common/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/shelf/shelf_layout_manager.h" 10 #include "ash/common/shelf/shelf_layout_manager.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 WmShelf* shelf2 = WmShelf::ForWindow(roots[1]); 184 WmShelf* shelf2 = WmShelf::ForWindow(roots[1]);
185 ASSERT_TRUE(shelf1); 185 ASSERT_TRUE(shelf1);
186 ASSERT_TRUE(shelf2); 186 ASSERT_TRUE(shelf2);
187 187
188 // Both shelf controllers have a shelf widget. 188 // Both shelf controllers have a shelf widget.
189 ShelfWidget* shelf_widget1 = shelf1->shelf_widget(); 189 ShelfWidget* shelf_widget1 = shelf1->shelf_widget();
190 ShelfWidget* shelf_widget2 = shelf2->shelf_widget(); 190 ShelfWidget* shelf_widget2 = shelf2->shelf_widget();
191 ASSERT_TRUE(shelf_widget1); 191 ASSERT_TRUE(shelf_widget1);
192 ASSERT_TRUE(shelf_widget2); 192 ASSERT_TRUE(shelf_widget2);
193 193
194 // Simulate login.
194 SetUserLoggedIn(true); 195 SetUserLoggedIn(true);
195 Shell::GetInstance()->CreateShelf(); 196 SetSessionStarted(true);
196 197
197 // The shelf view and status area horizontally fill the shelf widget. 198 // The shelf view and status area horizontally fill the shelf widget.
198 const int status_width1 = 199 const int status_width1 =
199 shelf_widget1->status_area_widget()->GetWindowBoundsInScreen().width(); 200 shelf_widget1->status_area_widget()->GetWindowBoundsInScreen().width();
200 EXPECT_GT(status_width1, 0); 201 EXPECT_GT(status_width1, 0);
201 EXPECT_EQ(shelf_widget1->GetContentsView()->width(), 202 EXPECT_EQ(shelf_widget1->GetContentsView()->width(),
202 shelf1->GetShelfViewForTesting()->width() + status_width1); 203 shelf1->GetShelfViewForTesting()->width() + status_width1);
203 204
204 const int status_width2 = 205 const int status_width2 =
205 shelf_widget2->status_area_widget()->GetWindowBoundsInScreen().width(); 206 shelf_widget2->status_area_widget()->GetWindowBoundsInScreen().width();
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 491 }
491 492
492 TEST_P(ShelfWidgetTestWithDelegate, CreateLockedShelf) { 493 TEST_P(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
493 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 494 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
494 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED, 495 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED,
495 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 496 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
496 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 497 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
497 } 498 }
498 499
499 } // namespace ash 500 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_delegate.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698