| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 { |
| 32 return can_maximize_; |
| 33 } |
| 34 |
| 31 private: | 35 private: |
| 32 bool can_maximize_; | 36 bool can_maximize_; |
| 33 | 37 |
| 34 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); |
| 35 }; | 39 }; |
| 36 | 40 |
| 37 } // namespace | 41 } // namespace |
| 38 | 42 |
| 39 class FrameCaptionButtonContainerViewTest : public ash::test::AshTestBase { | 43 class FrameCaptionButtonContainerViewTest : public ash::test::AshTestBase { |
| 40 public: | 44 public: |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 EXPECT_TRUE(test.size_button()->visible()); | 207 EXPECT_TRUE(test.size_button()->visible()); |
| 204 EXPECT_TRUE(test.close_button()->visible()); | 208 EXPECT_TRUE(test.close_button()->visible()); |
| 205 EXPECT_EQ(initial_minimize_button_bounds, test.minimize_button()->bounds()); | 209 EXPECT_EQ(initial_minimize_button_bounds, test.minimize_button()->bounds()); |
| 206 EXPECT_EQ(initial_size_button_bounds, test.size_button()->bounds()); | 210 EXPECT_EQ(initial_size_button_bounds, test.size_button()->bounds()); |
| 207 EXPECT_EQ(initial_close_button_bounds, test.close_button()->bounds()); | 211 EXPECT_EQ(initial_close_button_bounds, test.close_button()->bounds()); |
| 208 EXPECT_EQ(container.GetPreferredSize().width(), | 212 EXPECT_EQ(container.GetPreferredSize().width(), |
| 209 initial_container_bounds.width()); | 213 initial_container_bounds.width()); |
| 210 } | 214 } |
| 211 | 215 |
| 212 } // namespace ash | 216 } // namespace ash |
| OLD | NEW |