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

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

Issue 2007003002: mash: Preliminary support for shelf auto-hide (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shutdown
Patch Set: rebase Created 4 years, 7 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
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 public: 235 public:
236 ShelfLayoutObserverTest() 236 ShelfLayoutObserverTest()
237 : changed_auto_hide_state_(false) { 237 : changed_auto_hide_state_(false) {
238 } 238 }
239 239
240 ~ShelfLayoutObserverTest() override {} 240 ~ShelfLayoutObserverTest() override {}
241 241
242 bool changed_auto_hide_state() const { return changed_auto_hide_state_; } 242 bool changed_auto_hide_state() const { return changed_auto_hide_state_; }
243 243
244 private: 244 private:
245 // ShelfLayoutManagerObserver:
245 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override { 246 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override {
246 changed_auto_hide_state_ = true; 247 changed_auto_hide_state_ = true;
247 } 248 }
248 249
249 bool changed_auto_hide_state_; 250 bool changed_auto_hide_state_;
250 251
251 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest); 252 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest);
252 }; 253 };
253 254
254 // Trivial item implementation that tracks its views for testing. 255 // Trivial item implementation that tracks its views for testing.
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 StatusAreaWidget* status_area_widget = 2294 StatusAreaWidget* status_area_widget =
2294 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); 2295 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
2295 EXPECT_TRUE(status_area_widget->IsVisible()); 2296 EXPECT_TRUE(status_area_widget->IsVisible());
2296 // Shelf should be in the first display's area. 2297 // Shelf should be in the first display's area.
2297 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); 2298 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen());
2298 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); 2299 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds));
2299 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); 2300 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right());
2300 } 2301 }
2301 2302
2302 } // namespace ash 2303 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698