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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Clean up. | 438 // Clean up. |
439 widget->Close(); | 439 widget->Close(); |
440 } | 440 } |
441 | 441 |
442 // Various assertions around SetShelfAutoHideBehavior() and | 442 // Various assertions around SetShelfAutoHideBehavior() and |
443 // GetShelfAutoHideBehavior(). | 443 // GetShelfAutoHideBehavior(). |
444 TEST_F(ShellTest, ToggleAutoHide) { | 444 TEST_F(ShellTest, ToggleAutoHide) { |
445 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 445 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
447 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 447 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
448 window->Init(aura::WINDOW_LAYER_TEXTURED); | 448 window->Init(ui::LAYER_TEXTURED); |
449 ParentWindowInPrimaryRootWindow(window.get()); | 449 ParentWindowInPrimaryRootWindow(window.get()); |
450 window->Show(); | 450 window->Show(); |
451 wm::ActivateWindow(window.get()); | 451 wm::ActivateWindow(window.get()); |
452 | 452 |
453 Shell* shell = Shell::GetInstance(); | 453 Shell* shell = Shell::GetInstance(); |
454 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 454 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
455 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 455 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
456 root_window); | 456 root_window); |
457 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 457 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
458 shell->GetShelfAutoHideBehavior(root_window)); | 458 shell->GetShelfAutoHideBehavior(root_window)); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 515 |
516 protected: | 516 protected: |
517 scoped_ptr<aura::Window> window_; | 517 scoped_ptr<aura::Window> window_; |
518 | 518 |
519 private: | 519 private: |
520 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 520 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
521 }; | 521 }; |
522 | 522 |
523 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 523 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
524 window_.reset(new aura::Window(NULL)); | 524 window_.reset(new aura::Window(NULL)); |
525 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 525 window_->Init(ui::LAYER_NOT_DRAWN); |
526 } | 526 } |
527 | 527 |
528 } // namespace ash | 528 } // namespace ash |
OLD | NEW |