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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); | 42 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); |
43 }; | 43 }; |
44 | 44 |
45 class TestWidgetConstraintsDelegate : public TestWidgetDelegate { | 45 class TestWidgetConstraintsDelegate : public TestWidgetDelegate { |
46 public: | 46 public: |
47 TestWidgetConstraintsDelegate() {} | 47 TestWidgetConstraintsDelegate() {} |
48 virtual ~TestWidgetConstraintsDelegate() {} | 48 virtual ~TestWidgetConstraintsDelegate() {} |
49 | 49 |
50 // views::View: | 50 // views::View: |
51 virtual gfx::Size GetMinimumSize() OVERRIDE { | 51 virtual gfx::Size GetMinimumSize() const OVERRIDE { |
52 return minimum_size_; | 52 return minimum_size_; |
53 } | 53 } |
54 | 54 |
55 virtual gfx::Size GetMaximumSize() OVERRIDE { | 55 virtual gfx::Size GetMaximumSize() OVERRIDE { |
56 return maximum_size_; | 56 return maximum_size_; |
57 } | 57 } |
58 | 58 |
59 virtual views::View* GetContentsView() OVERRIDE { | 59 virtual views::View* GetContentsView() OVERRIDE { |
60 // Set this instance as the contents view so that the maximum and minimum | 60 // Set this instance as the contents view so that the maximum and minimum |
61 // size constraints will be used. | 61 // size constraints will be used. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 const gfx::Rect maximize_mode_bounds = delegate-> | 213 const gfx::Rect maximize_mode_bounds = delegate-> |
214 GetFrameCaptionButtonContainerViewBounds(); | 214 GetFrameCaptionButtonContainerViewBounds(); |
215 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); | 215 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); |
216 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); | 216 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); |
217 const gfx::Rect after_restore = delegate-> | 217 const gfx::Rect after_restore = delegate-> |
218 GetFrameCaptionButtonContainerViewBounds(); | 218 GetFrameCaptionButtonContainerViewBounds(); |
219 EXPECT_EQ(initial, after_restore); | 219 EXPECT_EQ(initial, after_restore); |
220 } | 220 } |
221 | 221 |
222 } // namespace ash | 222 } // namespace ash |
OLD | NEW |