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

Side by Side Diff: ash/shell_unittest.cc

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 EXPECT_EQ(views::MenuRunner::NORMAL_EXIT, 368 EXPECT_EQ(views::MenuRunner::NORMAL_EXIT,
369 menu_runner->RunMenuAt(widget, 369 menu_runner->RunMenuAt(widget,
370 NULL, 370 NULL,
371 gfx::Rect(), 371 gfx::Rect(),
372 views::MENU_ANCHOR_TOPLEFT, 372 views::MENU_ANCHOR_TOPLEFT,
373 ui::MENU_SOURCE_MOUSE)); 373 ui::MENU_SOURCE_MOUSE));
374 } 374 }
375 375
376 TEST_F(ShellTest, ManagedWindowModeBasics) { 376 TEST_F(ShellTest, ManagedWindowModeBasics) {
377 if (!SupportsHostWindowResize())
378 return;
379
377 // We start with the usual window containers. 380 // We start with the usual window containers.
378 ExpectAllContainers(); 381 ExpectAllContainers();
379 // Shelf is visible. 382 // Shelf is visible.
380 ShelfWidget* shelf_widget = Shelf::ForPrimaryDisplay()->shelf_widget(); 383 ShelfWidget* shelf_widget = Shelf::ForPrimaryDisplay()->shelf_widget();
381 EXPECT_TRUE(shelf_widget->IsVisible()); 384 EXPECT_TRUE(shelf_widget->IsVisible());
382 // Shelf is at bottom-left of screen. 385 // Shelf is at bottom-left of screen.
383 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x()); 386 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x());
384 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(), 387 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(),
385 shelf_widget->GetWindowBoundsInScreen().bottom()); 388 shelf_widget->GetWindowBoundsInScreen().bottom());
386 // We have a desktop background but not a bare layer. 389 // We have a desktop background but not a bare layer.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 private: 522 private:
520 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 523 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
521 }; 524 };
522 525
523 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 526 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
524 window_.reset(new aura::Window(NULL)); 527 window_.reset(new aura::Window(NULL));
525 window_->Init(ui::LAYER_NOT_DRAWN); 528 window_->Init(ui::LAYER_NOT_DRAWN);
526 } 529 }
527 530
528 } // namespace ash 531 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698