| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // Clean up. | 456 // Clean up. |
| 457 widget->Close(); | 457 widget->Close(); |
| 458 } | 458 } |
| 459 | 459 |
| 460 // Various assertions around SetShelfAutoHideBehavior() and | 460 // Various assertions around SetShelfAutoHideBehavior() and |
| 461 // GetShelfAutoHideBehavior(). | 461 // GetShelfAutoHideBehavior(). |
| 462 TEST_F(ShellTest, ToggleAutoHide) { | 462 TEST_F(ShellTest, ToggleAutoHide) { |
| 463 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 463 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
| 464 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 464 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 465 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 465 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 466 window->Init(ui::LAYER_TEXTURED); | 466 window->Init(aura::WINDOW_LAYER_TEXTURED); |
| 467 ParentWindowInPrimaryRootWindow(window.get()); | 467 ParentWindowInPrimaryRootWindow(window.get()); |
| 468 window->Show(); | 468 window->Show(); |
| 469 wm::ActivateWindow(window.get()); | 469 wm::ActivateWindow(window.get()); |
| 470 | 470 |
| 471 Shell* shell = Shell::GetInstance(); | 471 Shell* shell = Shell::GetInstance(); |
| 472 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 472 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
| 473 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 473 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
| 474 root_window); | 474 root_window); |
| 475 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 475 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
| 476 shell->GetShelfAutoHideBehavior(root_window)); | 476 shell->GetShelfAutoHideBehavior(root_window)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 protected: | 526 protected: |
| 527 scoped_ptr<aura::Window> window_; | 527 scoped_ptr<aura::Window> window_; |
| 528 | 528 |
| 529 private: | 529 private: |
| 530 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 530 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
| 531 }; | 531 }; |
| 532 | 532 |
| 533 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 533 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
| 534 window_.reset(new aura::Window(NULL)); | 534 window_.reset(new aura::Window(NULL)); |
| 535 window_->Init(ui::LAYER_NOT_DRAWN); | 535 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
| 536 } | 536 } |
| 537 | 537 |
| 538 } // namespace ash | 538 } // namespace ash |
| OLD | NEW |