OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura_shell/workspace/workspace_manager.h" | 5 #include "ui/aura_shell/workspace/workspace_manager.h" |
6 #include "ui/aura_shell/workspace/workspace.h" | 6 #include "ui/aura_shell/workspace/workspace.h" |
7 | 7 |
8 #include "ui/aura/test/aura_test_base.h" | 8 #include "ui/aura/test/aura_test_base.h" |
9 #include "ui/aura/test/test_desktop_delegate.h" | 9 #include "ui/aura/test/test_desktop_delegate.h" |
10 #include "ui/aura/desktop.h" | 10 #include "ui/aura/desktop.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 manager_.reset(new aura_shell::WorkspaceManager(viewport())); | 23 manager_.reset(new aura_shell::WorkspaceManager(viewport())); |
24 } | 24 } |
25 | 25 |
26 virtual void TearDown() OVERRIDE { | 26 virtual void TearDown() OVERRIDE { |
27 manager_.reset(); | 27 manager_.reset(); |
28 aura::test::AuraTestBase::TearDown(); | 28 aura::test::AuraTestBase::TearDown(); |
29 } | 29 } |
30 | 30 |
31 aura::Window* CreateTestWindow() { | 31 aura::Window* CreateTestWindow() { |
32 aura::Window* window = new aura::Window(NULL); | 32 aura::Window* window = new aura::Window(NULL); |
33 window->Init(ui::Layer::LAYER_HAS_NO_TEXTURE); | 33 window->Init(ui::Layer::LAYER_HAS_NO_TEXTURE, |
| 34 aura::Window::LAYER_INITIALLY_INVISIBLE); |
34 return window; | 35 return window; |
35 } | 36 } |
36 | 37 |
37 aura::Window* viewport() { | 38 aura::Window* viewport() { |
38 return GetTestDesktopDelegate()->default_container(); | 39 return GetTestDesktopDelegate()->default_container(); |
39 } | 40 } |
40 scoped_ptr<aura_shell::WorkspaceManager> manager_; | 41 scoped_ptr<aura_shell::WorkspaceManager> manager_; |
41 | 42 |
42 private: | 43 private: |
43 DISALLOW_COPY_AND_ASSIGN(WorkspaceManagerTestBase); | 44 DISALLOW_COPY_AND_ASSIGN(WorkspaceManagerTestBase); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 EXPECT_EQ(w2.get(), overflow); | 484 EXPECT_EQ(w2.get(), overflow); |
484 EXPECT_EQ(-1, ws->GetIndexOf(w2.get())); | 485 EXPECT_EQ(-1, ws->GetIndexOf(w2.get())); |
485 EXPECT_EQ(0, ws->GetIndexOf(w1.get())); | 486 EXPECT_EQ(0, ws->GetIndexOf(w1.get())); |
486 EXPECT_EQ(1, ws->GetIndexOf(w3.get())); | 487 EXPECT_EQ(1, ws->GetIndexOf(w3.get())); |
487 | 488 |
488 // Reset now before windows are destroyed. | 489 // Reset now before windows are destroyed. |
489 manager_.reset(); | 490 manager_.reset(); |
490 } | 491 } |
491 | 492 |
492 } // namespace aura_shell | 493 } // namespace aura_shell |
OLD | NEW |