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/toplevel_window_event_handler.h" | 5 #include "ash/wm/toplevel_window_event_handler.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 class ToplevelWindowEventHandlerTest : public AshTestBase { | 60 class ToplevelWindowEventHandlerTest : public AshTestBase { |
61 public: | 61 public: |
62 ToplevelWindowEventHandlerTest() {} | 62 ToplevelWindowEventHandlerTest() {} |
63 virtual ~ToplevelWindowEventHandlerTest() {} | 63 virtual ~ToplevelWindowEventHandlerTest() {} |
64 | 64 |
65 protected: | 65 protected: |
66 aura::Window* CreateWindow(int hittest_code) { | 66 aura::Window* CreateWindow(int hittest_code) { |
67 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); | 67 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); |
68 aura::Window* w1 = new aura::Window(d1); | 68 aura::Window* w1 = new aura::Window(d1); |
69 w1->SetType(aura::client::WINDOW_TYPE_NORMAL); | 69 w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
70 w1->set_id(1); | 70 w1->set_id(1); |
71 w1->Init(ui::LAYER_TEXTURED); | 71 w1->Init(ui::LAYER_TEXTURED); |
72 aura::Window* parent = | 72 aura::Window* parent = |
73 Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 73 Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
74 internal::kShellWindowId_AlwaysOnTopContainer); | 74 internal::kShellWindowId_AlwaysOnTopContainer); |
75 parent->AddChild(w1); | 75 parent->AddChild(w1); |
76 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 76 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
77 w1->Show(); | 77 w1->Show(); |
78 return w1; | 78 return w1; |
79 } | 79 } |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 RunAllPendingInMessageLoop(); | 685 RunAllPendingInMessageLoop(); |
686 EXPECT_EQ("10,11 100x100", target->bounds().ToString()); | 686 EXPECT_EQ("10,11 100x100", target->bounds().ToString()); |
687 } | 687 } |
688 } | 688 } |
689 | 689 |
690 // Showing the resize shadows when the mouse is over the window edges is tested | 690 // Showing the resize shadows when the mouse is over the window edges is tested |
691 // in resize_shadow_and_cursor_test.cc | 691 // in resize_shadow_and_cursor_test.cc |
692 | 692 |
693 } // namespace test | 693 } // namespace test |
694 } // namespace ash | 694 } // namespace ash |
OLD | NEW |