OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/caption_buttons/frame_caption_button_container_view.h" | 5 #include "ash/frame/caption_buttons/frame_caption_button_container_view.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/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
11 #include "grit/ash_resources.h" | 11 #include "grit/ash_resources.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
14 #include "ui/views/widget/widget_delegate.h" | 14 #include "ui/views/widget/widget_delegate.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class TestWidgetDelegate : public views::WidgetDelegateView { | 20 class TestWidgetDelegate : public views::WidgetDelegateView { |
21 public: | 21 public: |
22 explicit TestWidgetDelegate(bool can_maximize) : can_maximize_(can_maximize) { | 22 explicit TestWidgetDelegate(bool can_maximize) : can_maximize_(can_maximize) { |
23 } | 23 } |
24 virtual ~TestWidgetDelegate() { | 24 virtual ~TestWidgetDelegate() { |
25 } | 25 } |
26 | 26 |
27 virtual bool CanMaximize() const OVERRIDE { | 27 virtual bool CanMaximize() const override { |
28 return can_maximize_; | 28 return can_maximize_; |
29 } | 29 } |
30 | 30 |
31 virtual bool CanMinimize() const OVERRIDE { | 31 virtual bool CanMinimize() const override { |
32 return can_maximize_; | 32 return can_maximize_; |
33 } | 33 } |
34 | 34 |
35 private: | 35 private: |
36 bool can_maximize_; | 36 bool can_maximize_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace | 41 } // namespace |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 EXPECT_TRUE(test.size_button()->visible()); | 207 EXPECT_TRUE(test.size_button()->visible()); |
208 EXPECT_TRUE(test.close_button()->visible()); | 208 EXPECT_TRUE(test.close_button()->visible()); |
209 EXPECT_EQ(initial_minimize_button_bounds, test.minimize_button()->bounds()); | 209 EXPECT_EQ(initial_minimize_button_bounds, test.minimize_button()->bounds()); |
210 EXPECT_EQ(initial_size_button_bounds, test.size_button()->bounds()); | 210 EXPECT_EQ(initial_size_button_bounds, test.size_button()->bounds()); |
211 EXPECT_EQ(initial_close_button_bounds, test.close_button()->bounds()); | 211 EXPECT_EQ(initial_close_button_bounds, test.close_button()->bounds()); |
212 EXPECT_EQ(container.GetPreferredSize().width(), | 212 EXPECT_EQ(container.GetPreferredSize().width(), |
213 initial_container_bounds.width()); | 213 initial_container_bounds.width()); |
214 } | 214 } |
215 | 215 |
216 } // namespace ash | 216 } // namespace ash |
OLD | NEW |