| OLD | NEW |
| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 Shell* shell = Shell::GetInstance(); | 393 Shell* shell = Shell::GetInstance(); |
| 394 Shell::TestApi test_api(shell); | 394 Shell::TestApi test_api(shell); |
| 395 | 395 |
| 396 // We start with the usual window containers. | 396 // We start with the usual window containers. |
| 397 ExpectAllContainers(); | 397 ExpectAllContainers(); |
| 398 // Shelf is visible. | 398 // Shelf is visible. |
| 399 ShelfWidget* launcher_widget = Launcher::ForPrimaryDisplay()->shelf_widget(); | 399 ShelfWidget* launcher_widget = Launcher::ForPrimaryDisplay()->shelf_widget(); |
| 400 EXPECT_TRUE(launcher_widget->IsVisible()); | 400 EXPECT_TRUE(launcher_widget->IsVisible()); |
| 401 // Shelf is at bottom-left of screen. | 401 // Shelf is at bottom-left of screen. |
| 402 EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x()); | 402 EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x()); |
| 403 EXPECT_EQ( | 403 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetDispatcher()->host()-> |
| 404 Shell::GetPrimaryRootWindow()->GetDispatcher()->GetHostSize().height(), | 404 GetBounds().height(), |
| 405 launcher_widget->GetWindowBoundsInScreen().bottom()); | 405 launcher_widget->GetWindowBoundsInScreen().bottom()); |
| 406 // We have a desktop background but not a bare layer. | 406 // We have a desktop background but not a bare layer. |
| 407 // TODO (antrim): enable once we find out why it fails component build. | 407 // TODO (antrim): enable once we find out why it fails component build. |
| 408 // internal::DesktopBackgroundWidgetController* background = | 408 // internal::DesktopBackgroundWidgetController* background = |
| 409 // Shell::GetPrimaryRootWindow()-> | 409 // Shell::GetPrimaryRootWindow()-> |
| 410 // GetProperty(internal::kWindowDesktopComponent); | 410 // GetProperty(internal::kWindowDesktopComponent); |
| 411 // EXPECT_TRUE(background); | 411 // EXPECT_TRUE(background); |
| 412 // EXPECT_TRUE(background->widget()); | 412 // EXPECT_TRUE(background->widget()); |
| 413 // EXPECT_FALSE(background->layer()); | 413 // EXPECT_FALSE(background->layer()); |
| 414 | 414 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 private: | 531 private: |
| 532 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 532 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 535 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
| 536 window_.reset(new aura::Window(NULL)); | 536 window_.reset(new aura::Window(NULL)); |
| 537 window_->Init(ui::LAYER_NOT_DRAWN); | 537 window_->Init(ui::LAYER_NOT_DRAWN); |
| 538 } | 538 } |
| 539 | 539 |
| 540 } // namespace ash | 540 } // namespace ash |
| OLD | NEW |