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 "ash/frame/custom_frame_view_ash.h" | 5 #include "ash/frame/custom_frame_view_ash.h" |
6 | 6 |
7 #include "ash/frame/caption_buttons/frame_caption_button.h" | 7 #include "ash/frame/caption_buttons/frame_caption_button.h" |
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 protected: | 102 protected: |
103 scoped_ptr<views::Widget> CreateWidget(TestWidgetDelegate* delegate) { | 103 scoped_ptr<views::Widget> CreateWidget(TestWidgetDelegate* delegate) { |
104 scoped_ptr<views::Widget> widget(new views::Widget); | 104 scoped_ptr<views::Widget> widget(new views::Widget); |
105 views::Widget::InitParams params; | 105 views::Widget::InitParams params; |
106 params.delegate = delegate; | 106 params.delegate = delegate; |
107 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 107 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
108 params.bounds = gfx::Rect(0, 0, 100, 100); | 108 params.bounds = gfx::Rect(0, 0, 100, 100); |
109 params.context = CurrentContext(); | 109 params.context = CurrentContext(); |
110 widget->Init(params); | 110 widget->Init(params); |
111 return widget.Pass(); | 111 return widget; |
112 } | 112 } |
113 | 113 |
114 test::TestSessionStateDelegate* GetTestSessionStateDelegate() { | 114 test::TestSessionStateDelegate* GetTestSessionStateDelegate() { |
115 return static_cast<ash::test::TestSessionStateDelegate*>( | 115 return static_cast<ash::test::TestSessionStateDelegate*>( |
116 Shell::GetInstance()->session_state_delegate()); | 116 Shell::GetInstance()->session_state_delegate()); |
117 } | 117 } |
118 | 118 |
119 private: | 119 private: |
120 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAshTest); | 120 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAshTest); |
121 }; | 121 }; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); | 220 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); |
221 Shell::GetInstance()->maximize_mode_controller()-> | 221 Shell::GetInstance()->maximize_mode_controller()-> |
222 EnableMaximizeModeWindowManager(false); | 222 EnableMaximizeModeWindowManager(false); |
223 delegate->EndFrameCaptionButtonContainerViewAnimations(); | 223 delegate->EndFrameCaptionButtonContainerViewAnimations(); |
224 const gfx::Rect after_restore = delegate-> | 224 const gfx::Rect after_restore = delegate-> |
225 GetFrameCaptionButtonContainerViewBounds(); | 225 GetFrameCaptionButtonContainerViewBounds(); |
226 EXPECT_EQ(initial, after_restore); | 226 EXPECT_EQ(initial, after_restore); |
227 } | 227 } |
228 | 228 |
229 } // namespace ash | 229 } // namespace ash |
OLD | NEW |