| 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/ash_switches.h" | 5 #include "ash/ash_switches.h" |
| 6 #include "ash/launcher/launcher.h" | 6 #include "ash/launcher/launcher.h" |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 // We start with the usual window containers. | 264 // We start with the usual window containers. |
| 265 ExpectAllContainers(); | 265 ExpectAllContainers(); |
| 266 // We have a default container event filter (for window drags). | 266 // We have a default container event filter (for window drags). |
| 267 EXPECT_TRUE(GetDefaultContainer()->event_filter()); | 267 EXPECT_TRUE(GetDefaultContainer()->event_filter()); |
| 268 // Launcher is visible. | 268 // Launcher is visible. |
| 269 views::Widget* launcher_widget = shell->launcher()->widget(); | 269 views::Widget* launcher_widget = shell->launcher()->widget(); |
| 270 EXPECT_TRUE(launcher_widget->IsVisible()); | 270 EXPECT_TRUE(launcher_widget->IsVisible()); |
| 271 // Launcher is at bottom-left of screen. | 271 // Launcher is at bottom-left of screen. |
| 272 EXPECT_EQ(0, launcher_widget->GetWindowScreenBounds().x()); | 272 EXPECT_EQ(0, launcher_widget->GetWindowScreenBounds().x()); |
| 273 EXPECT_EQ(Shell::GetRootWindow()->GetHostSize().height(), | 273 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(), |
| 274 launcher_widget->GetWindowScreenBounds().bottom()); | 274 launcher_widget->GetWindowScreenBounds().bottom()); |
| 275 // We have a desktop background but not a bare layer. | 275 // We have a desktop background but not a bare layer. |
| 276 EXPECT_TRUE(test_api.root_window_layout()->background_widget()); | 276 EXPECT_TRUE(test_api.root_window_layout()->background_widget()); |
| 277 EXPECT_FALSE(test_api.root_window_layout()->background_layer()); | 277 EXPECT_FALSE(test_api.root_window_layout()->background_layer()); |
| 278 | 278 |
| 279 // Create a normal window. It is not maximized. | 279 // Create a normal window. It is not maximized. |
| 280 views::Widget::InitParams widget_params( | 280 views::Widget::InitParams widget_params( |
| 281 views::Widget::InitParams::TYPE_WINDOW); | 281 views::Widget::InitParams::TYPE_WINDOW); |
| 282 widget_params.bounds.SetRect(11, 22, 300, 400); | 282 widget_params.bounds.SetRect(11, 22, 300, 400); |
| 283 views::Widget* widget = CreateTestWindow(widget_params); | 283 views::Widget* widget = CreateTestWindow(widget_params); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 private: | 335 private: |
| 336 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 336 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 339 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
| 340 window_.reset(new aura::Window(NULL)); | 340 window_.reset(new aura::Window(NULL)); |
| 341 window_->Init(ui::LAYER_NOT_DRAWN); | 341 window_->Init(ui::LAYER_NOT_DRAWN); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace ash | 344 } // namespace ash |
| OLD | NEW |