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

Side by Side Diff: ash/shell_unittest.cc

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: feedback 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
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/system/toast/toast_manager_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/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 FROM_HERE, base::Bind(&ShellTest::LockScreenAndVerifyMenuClosed, 362 FROM_HERE, base::Bind(&ShellTest::LockScreenAndVerifyMenuClosed,
363 base::Unretained(this))); 363 base::Unretained(this)));
364 364
365 EXPECT_EQ(views::MenuRunner::NORMAL_EXIT, 365 EXPECT_EQ(views::MenuRunner::NORMAL_EXIT,
366 menu_runner->RunMenuAt(widget, NULL, gfx::Rect(), 366 menu_runner->RunMenuAt(widget, NULL, gfx::Rect(),
367 views::MENU_ANCHOR_TOPLEFT, 367 views::MENU_ANCHOR_TOPLEFT,
368 ui::MENU_SOURCE_MOUSE)); 368 ui::MENU_SOURCE_MOUSE));
369 } 369 }
370 370
371 TEST_F(ShellTest, ManagedWindowModeBasics) { 371 TEST_F(ShellTest, ManagedWindowModeBasics) {
372 if (!SupportsHostWindowResize())
373 return;
374
375 // We start with the usual window containers. 372 // We start with the usual window containers.
376 ExpectAllContainers(); 373 ExpectAllContainers();
377 // Shelf is visible. 374 // Shelf is visible.
378 ShelfWidget* shelf_widget = GetPrimaryShelf()->shelf_widget(); 375 ShelfWidget* shelf_widget = GetPrimaryShelf()->shelf_widget();
379 EXPECT_TRUE(shelf_widget->IsVisible()); 376 EXPECT_TRUE(shelf_widget->IsVisible());
380 // Shelf is at bottom-left of screen. 377 // Shelf is at bottom-left of screen.
381 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x()); 378 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x());
382 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(), 379 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(),
383 shelf_widget->GetWindowBoundsInScreen().bottom()); 380 shelf_widget->GetWindowBoundsInScreen().bottom());
384 // We have a wallpaper but not a bare layer. 381 // We have a wallpaper but not a bare layer.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 private: 504 private:
508 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 505 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
509 }; 506 };
510 507
511 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 508 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
512 window_.reset(new aura::Window(NULL)); 509 window_.reset(new aura::Window(NULL));
513 window_->Init(ui::LAYER_NOT_DRAWN); 510 window_->Init(ui::LAYER_NOT_DRAWN);
514 } 511 }
515 512
516 } // namespace ash 513 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/system/toast/toast_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698