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

Side by Side Diff: ash/frame/caption_buttons/frame_size_button_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
OLDNEW
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/caption_buttons/frame_size_button.h" 5 #include "ash/frame/caption_buttons/frame_size_button.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 22 matching lines...) Expand all
33 // Overridden from views::WidgetDelegate: 33 // Overridden from views::WidgetDelegate:
34 virtual views::View* GetContentsView() OVERRIDE { 34 virtual views::View* GetContentsView() OVERRIDE {
35 return this; 35 return this;
36 } 36 }
37 virtual bool CanResize() const OVERRIDE { 37 virtual bool CanResize() const OVERRIDE {
38 return true; 38 return true;
39 } 39 }
40 virtual bool CanMaximize() const OVERRIDE { 40 virtual bool CanMaximize() const OVERRIDE {
41 return true; 41 return true;
42 } 42 }
43 virtual bool CanMinimize() const OVERRIDE {
44 return true;
45 }
43 46
44 ash::FrameCaptionButtonContainerView* caption_button_container() { 47 ash::FrameCaptionButtonContainerView* caption_button_container() {
45 return caption_button_container_; 48 return caption_button_container_;
46 } 49 }
47 50
48 private: 51 private:
49 // Overridden from views::View: 52 // Overridden from views::View:
50 virtual void Layout() OVERRIDE { 53 virtual void Layout() OVERRIDE {
51 caption_button_container_->Layout(); 54 caption_button_container_->Layout();
52 55
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 466
464 // None of the buttons should stay pressed and the buttons should have their 467 // None of the buttons should stay pressed and the buttons should have their
465 // regular icons. 468 // regular icons.
466 EXPECT_TRUE(AllButtonsInNormalState()); 469 EXPECT_TRUE(AllButtonsInNormalState());
467 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon()); 470 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
468 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon()); 471 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
469 } 472 }
470 473
471 } // namespace test 474 } // namespace test
472 } // namespace ash 475 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/frame_caption_button_container_view_unittest.cc ('k') | ash/frame/custom_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698