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

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

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 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/common/frame/caption_buttons/frame_size_button.h" 5 #include "ash/common/frame/caption_buttons/frame_size_button.h"
6 6
7 #include "ash/common/ash_layout_constants.h" 7 #include "ash/common/ash_layout_constants.h"
8 #include "ash/common/frame/caption_buttons/frame_caption_button.h" 8 #include "ash/common/frame/caption_buttons/frame_caption_button.h"
9 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h " 9 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h "
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 15 matching lines...) Expand all
26 namespace test { 26 namespace test {
27 27
28 namespace { 28 namespace {
29 29
30 class TestWidgetDelegate : public views::WidgetDelegateView { 30 class TestWidgetDelegate : public views::WidgetDelegateView {
31 public: 31 public:
32 TestWidgetDelegate() {} 32 TestWidgetDelegate() {}
33 ~TestWidgetDelegate() override {} 33 ~TestWidgetDelegate() override {}
34 34
35 // Overridden from views::WidgetDelegate: 35 // Overridden from views::WidgetDelegate:
36 views::View* GetContentsView() override { return this; }
37 bool CanResize() const override { return true; } 36 bool CanResize() const override { return true; }
38 bool CanMaximize() const override { return true; } 37 bool CanMaximize() const override { return true; }
39 bool CanMinimize() const override { return true; } 38 bool CanMinimize() const override { return true; }
40 39
41 ash::FrameCaptionButtonContainerView* caption_button_container() { 40 ash::FrameCaptionButtonContainerView* caption_button_container() {
42 return caption_button_container_; 41 return caption_button_container_;
43 } 42 }
44 43
45 private: 44 private:
46 // Overridden from views::View: 45 // Overridden from views::View:
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 456
458 // None of the buttons should stay pressed and the buttons should have their 457 // None of the buttons should stay pressed and the buttons should have their
459 // regular icons. 458 // regular icons.
460 EXPECT_TRUE(AllButtonsInNormalState()); 459 EXPECT_TRUE(AllButtonsInNormalState());
461 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon()); 460 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
462 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon()); 461 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
463 } 462 }
464 463
465 } // namespace test 464 } // namespace test
466 } // namespace ash 465 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698