| 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/launcher/launcher_context_menu.h" | 5 #include "ash/launcher/launcher_context_menu.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| 11 #include "ui/aura/client/aura_constants.h" | 11 #include "ui/aura/client/aura_constants.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
| 14 #include "ui/gfx/compositor/layer.h" | 14 #include "ui/compositor/layer.h" |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 | 17 |
| 18 typedef test::AshTestBase LauncherContextMenuTest; | 18 typedef test::AshTestBase LauncherContextMenuTest; |
| 19 | 19 |
| 20 // Various assertions around IsAutoHideMenuHideChecked() and | 20 // Various assertions around IsAutoHideMenuHideChecked() and |
| 21 // ToggleAutoHideMenu(). | 21 // ToggleAutoHideMenu(). |
| 22 TEST_F(LauncherContextMenuTest, ToggleAutoHide) { | 22 TEST_F(LauncherContextMenuTest, ToggleAutoHide) { |
| 23 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 23 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
| 24 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 24 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 48 LauncherContextMenu::GetToggledAutoHideBehavior()); | 48 LauncherContextMenu::GetToggledAutoHideBehavior()); |
| 49 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER, | 49 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER, |
| 50 shell->GetShelfAutoHideBehavior()); | 50 shell->GetShelfAutoHideBehavior()); |
| 51 shell->SetShelfAutoHideBehavior( | 51 shell->SetShelfAutoHideBehavior( |
| 52 LauncherContextMenu::GetToggledAutoHideBehavior()); | 52 LauncherContextMenu::GetToggledAutoHideBehavior()); |
| 53 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT, | 53 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT, |
| 54 shell->GetShelfAutoHideBehavior()); | 54 shell->GetShelfAutoHideBehavior()); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace ash | 57 } // namespace ash |
| OLD | NEW |