OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/wm/public/window_manager.h" | 5 #include "athena/wm/public/window_manager.h" |
6 | 6 |
7 #include "athena/screen/public/screen_manager.h" | 7 #include "athena/screen/public/screen_manager.h" |
8 #include "athena/test/athena_test_base.h" | 8 #include "athena/test/athena_test_base.h" |
9 #include "athena/wm/public/window_list_provider.h" | 9 #include "athena/wm/public/window_list_provider.h" |
10 #include "athena/wm/split_view_controller.h" | 10 #include "athena/wm/split_view_controller.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 window->Show(); | 28 window->Show(); |
29 return window.Pass(); | 29 return window.Pass(); |
30 } | 30 } |
31 | 31 |
32 } // namespace | 32 } // namespace |
33 | 33 |
34 namespace athena { | 34 namespace athena { |
35 | 35 |
36 typedef test::AthenaTestBase WindowManagerTest; | 36 typedef test::AthenaTestBase WindowManagerTest; |
37 | 37 |
38 TEST_F(WindowManagerTest, Empty) { | |
39 } | |
40 | |
41 TEST_F(WindowManagerTest, OverviewModeBasics) { | 38 TEST_F(WindowManagerTest, OverviewModeBasics) { |
42 aura::test::TestWindowDelegate delegate; | 39 aura::test::TestWindowDelegate delegate; |
43 scoped_ptr<aura::Window> first(CreateWindow(&delegate)); | 40 scoped_ptr<aura::Window> first(CreateWindow(&delegate)); |
44 scoped_ptr<aura::Window> second(CreateWindow(&delegate)); | 41 scoped_ptr<aura::Window> second(CreateWindow(&delegate)); |
45 | 42 |
46 test::WindowManagerImplTestApi wm_api; | 43 test::WindowManagerImplTestApi wm_api; |
47 aura::client::ParentWindowWithContext( | 44 aura::client::ParentWindowWithContext( |
48 first.get(), ScreenManager::Get()->GetContext(), gfx::Rect()); | 45 first.get(), ScreenManager::Get()->GetContext(), gfx::Rect()); |
49 aura::client::ParentWindowWithContext( | 46 aura::client::ParentWindowWithContext( |
50 second.get(), ScreenManager::Get()->GetContext(), gfx::Rect()); | 47 second.get(), ScreenManager::Get()->GetContext(), gfx::Rect()); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 WindowOverviewModeDelegate* overview_delegate = wm_api.wm(); | 363 WindowOverviewModeDelegate* overview_delegate = wm_api.wm(); |
367 overview_delegate->OnSelectWindow(w1.get()); | 364 overview_delegate->OnSelectWindow(w1.get()); |
368 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); | 365 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); |
369 EXPECT_TRUE(w1->IsVisible()); | 366 EXPECT_TRUE(w1->IsVisible()); |
370 // Make sure the windows that were in split-view mode are hidden. | 367 // Make sure the windows that were in split-view mode are hidden. |
371 EXPECT_FALSE(w2->IsVisible()); | 368 EXPECT_FALSE(w2->IsVisible()); |
372 EXPECT_FALSE(w3->IsVisible()); | 369 EXPECT_FALSE(w3->IsVisible()); |
373 } | 370 } |
374 | 371 |
375 } // namespace athena | 372 } // namespace athena |
OLD | NEW |