| 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/custom_frame_view_ash.h" | 5 #include "ash/wm/custom_frame_view_ash.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/maximize_bubble_controller.h" | 9 #include "ash/wm/maximize_bubble_controller.h" |
| 10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } // namespace | 71 } // namespace |
| 72 | 72 |
| 73 class CustomFrameViewAshTest : public ash::test::AshTestBase { | 73 class CustomFrameViewAshTest : public ash::test::AshTestBase { |
| 74 public: | 74 public: |
| 75 CustomFrameViewAshTest() {} | 75 CustomFrameViewAshTest() {} |
| 76 virtual ~CustomFrameViewAshTest() {} | 76 virtual ~CustomFrameViewAshTest() {} |
| 77 | 77 |
| 78 views::Widget* CreateWidget() { | 78 views::Widget* CreateWidget() { |
| 79 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 79 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
| 80 views::Widget* widget = new views::Widget; | 80 views::Widget* widget = new views::Widget; |
| 81 params.context = CurrentContext(); |
| 81 params.delegate = new TestWidgetDelegate; | 82 params.delegate = new TestWidgetDelegate; |
| 82 widget->Init(params); | 83 widget->Init(params); |
| 83 widget->Show(); | 84 widget->Show(); |
| 84 return widget; | 85 return widget; |
| 85 } | 86 } |
| 86 | 87 |
| 87 CustomFrameViewAsh* custom_frame_view_ash(views::Widget* widget) const { | 88 CustomFrameViewAsh* custom_frame_view_ash(views::Widget* widget) const { |
| 88 return static_cast<CustomFrameViewAsh*>(widget->non_client_view()-> | 89 return static_cast<CustomFrameViewAsh*>(widget->non_client_view()-> |
| 89 frame_view()); | 90 frame_view()); |
| 90 } | 91 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 | 692 |
| 692 // We simulate the keystroke by calling minimizeWindow directly. | 693 // We simulate the keystroke by calling minimizeWindow directly. |
| 693 wm::MinimizeWindow(window); | 694 wm::MinimizeWindow(window); |
| 694 | 695 |
| 695 EXPECT_TRUE(ash::wm::IsWindowMinimized(window)); | 696 EXPECT_TRUE(ash::wm::IsWindowMinimized(window)); |
| 696 EXPECT_FALSE(maximize_button->maximizer()); | 697 EXPECT_FALSE(maximize_button->maximizer()); |
| 697 } | 698 } |
| 698 | 699 |
| 699 } // namespace internal | 700 } // namespace internal |
| 700 } // namespace ash | 701 } // namespace ash |
| OLD | NEW |