| 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/wm/panels/panel_layout_manager.h" | 5 #include "ash/wm/panels/panel_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 GetShelfView(Launcher::ForPrimaryDisplay()))); | 56 GetShelfView(Launcher::ForPrimaryDisplay()))); |
| 57 shelf_view_test_->SetAnimationDuration(1); | 57 shelf_view_test_->SetAnimationDuration(1); |
| 58 } | 58 } |
| 59 | 59 |
| 60 aura::Window* CreateNormalWindow(const gfx::Rect& bounds) { | 60 aura::Window* CreateNormalWindow(const gfx::Rect& bounds) { |
| 61 return CreateTestWindowInShellWithBounds(bounds); | 61 return CreateTestWindowInShellWithBounds(bounds); |
| 62 } | 62 } |
| 63 | 63 |
| 64 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { | 64 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { |
| 65 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 65 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 66 NULL, | 66 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); |
| 67 aura::client::WINDOW_TYPE_PANEL, | |
| 68 0, | |
| 69 bounds); | |
| 70 test::TestShelfDelegate* shelf_delegate = | 67 test::TestShelfDelegate* shelf_delegate = |
| 71 test::TestShelfDelegate::instance(); | 68 test::TestShelfDelegate::instance(); |
| 72 shelf_delegate->AddLauncherItem(window); | 69 shelf_delegate->AddLauncherItem(window); |
| 73 PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( | 70 PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( |
| 74 GetPanelContainer(window)->layout_manager()); | 71 GetPanelContainer(window)->layout_manager()); |
| 75 manager->Relayout(); | 72 manager->Relayout(); |
| 76 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); | 73 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); |
| 77 return window; | 74 return window; |
| 78 } | 75 } |
| 79 | 76 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 EXPECT_TRUE(w1->IsVisible()); | 788 EXPECT_TRUE(w1->IsVisible()); |
| 792 EXPECT_FALSE(w2->IsVisible()); | 789 EXPECT_FALSE(w2->IsVisible()); |
| 793 EXPECT_TRUE(w3->IsVisible()); | 790 EXPECT_TRUE(w3->IsVisible()); |
| 794 } | 791 } |
| 795 | 792 |
| 796 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, | 793 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, |
| 797 testing::Bool()); | 794 testing::Bool()); |
| 798 | 795 |
| 799 } // namespace internal | 796 } // namespace internal |
| 800 } // namespace ash | 797 } // namespace ash |
| OLD | NEW |