Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: ash/frame/caption_buttons/frame_caption_button_container_view_unittest.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/frame/caption_buttons/frame_size_button_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/frame/caption_buttons/frame_size_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698