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

Side by Side Diff: ash/shell_unittest.cc

Issue 2288993002: ash: Move AppList support to ShelfWidget, expose ShelfWidget in WmShelf (Closed)
Patch Set: missed one unit test Created 4 years, 3 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_widget_unittest.cc ('k') | ash/wm/dock/docked_window_resizer_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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 ui::MENU_SOURCE_MOUSE)); 364 ui::MENU_SOURCE_MOUSE));
365 } 365 }
366 366
367 TEST_F(ShellTest, ManagedWindowModeBasics) { 367 TEST_F(ShellTest, ManagedWindowModeBasics) {
368 if (!SupportsHostWindowResize()) 368 if (!SupportsHostWindowResize())
369 return; 369 return;
370 370
371 // We start with the usual window containers. 371 // We start with the usual window containers.
372 ExpectAllContainers(); 372 ExpectAllContainers();
373 // Shelf is visible. 373 // Shelf is visible.
374 ShelfWidget* shelf_widget = GetPrimaryShelf()->GetShelfWidgetForTesting(); 374 ShelfWidget* shelf_widget = GetPrimaryShelf()->shelf_widget();
375 EXPECT_TRUE(shelf_widget->IsVisible()); 375 EXPECT_TRUE(shelf_widget->IsVisible());
376 // Shelf is at bottom-left of screen. 376 // Shelf is at bottom-left of screen.
377 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x()); 377 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x());
378 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(), 378 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(),
379 shelf_widget->GetWindowBoundsInScreen().bottom()); 379 shelf_widget->GetWindowBoundsInScreen().bottom());
380 // We have a desktop background but not a bare layer. 380 // We have a desktop background but not a bare layer.
381 // TODO (antrim): enable once we find out why it fails component build. 381 // TODO (antrim): enable once we find out why it fails component build.
382 // DesktopBackgroundWidgetController* background = 382 // DesktopBackgroundWidgetController* background =
383 // Shell::GetPrimaryRootWindow()-> 383 // Shell::GetPrimaryRootWindow()->
384 // GetProperty(kWindowDesktopComponent); 384 // GetProperty(kWindowDesktopComponent);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 private: 503 private:
504 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 504 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
505 }; 505 };
506 506
507 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 507 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
508 window_.reset(new aura::Window(NULL)); 508 window_.reset(new aura::Window(NULL));
509 window_->Init(ui::LAYER_NOT_DRAWN); 509 window_->Init(ui::LAYER_NOT_DRAWN);
510 } 510 }
511 511
512 } // namespace ash 512 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698