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

Side by Side Diff: ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc

Issue 148003003: Use white header for app windows part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/caption_buttons/frame_caption_button.h » ('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/wm/caption_buttons/alternate_frame_size_button.h" 5 #include "ash/wm/caption_buttons/alternate_frame_size_button.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.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/caption_buttons/frame_caption_button.h" 10 #include "ash/wm/caption_buttons/frame_caption_button.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const ViewHierarchyChangedDetails& details) OVERRIDE { 61 const ViewHierarchyChangedDetails& details) OVERRIDE {
62 if (details.is_add && details.child == this) { 62 if (details.is_add && details.child == this) {
63 caption_button_container_ = new FrameCaptionButtonContainerView( 63 caption_button_container_ = new FrameCaptionButtonContainerView(
64 GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); 64 GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
65 65
66 // Set arbitrary images for the container's buttons so that the buttons 66 // Set arbitrary images for the container's buttons so that the buttons
67 // have non-empty sizes. 67 // have non-empty sizes.
68 for (int icon = 0; icon < CAPTION_BUTTON_ICON_COUNT; ++icon) { 68 for (int icon = 0; icon < CAPTION_BUTTON_ICON_COUNT; ++icon) {
69 caption_button_container_->SetButtonImages( 69 caption_button_container_->SetButtonImages(
70 static_cast<CaptionButtonIcon>(icon), 70 static_cast<CaptionButtonIcon>(icon),
71 IDR_AURA_WINDOW_CLOSE, 71 IDR_AURA_WINDOW_CONTROL_ICON_CLOSE,
72 IDR_AURA_WINDOW_CLOSE_H, 72 IDR_AURA_WINDOW_CONTROL_ICON_CLOSE_I,
73 IDR_AURA_WINDOW_CLOSE_P); 73 IDR_AURA_WINDOW_CONTROL_BACKGROUND_H,
74 IDR_AURA_WINDOW_CONTROL_BACKGROUND_P);
74 } 75 }
75 76
76 AddChildView(caption_button_container_); 77 AddChildView(caption_button_container_);
77 } 78 }
78 } 79 }
79 80
80 // Not owned. 81 // Not owned.
81 ash::FrameCaptionButtonContainerView* caption_button_container_; 82 ash::FrameCaptionButtonContainerView* caption_button_container_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); 84 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 generator.MoveMouseTo(kWorkAreaBoundsInScreen.bottom_left()); 409 generator.MoveMouseTo(kWorkAreaBoundsInScreen.bottom_left());
409 EXPECT_TRUE(AllButtonsInNormalState()); 410 EXPECT_TRUE(AllButtonsInNormalState());
410 generator.MoveMouseTo(CenterPointInScreen(close_button())); 411 generator.MoveMouseTo(CenterPointInScreen(close_button()));
411 EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state()); 412 EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
412 EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state()); 413 EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
413 EXPECT_EQ(views::Button::STATE_HOVERED, close_button()->state()); 414 EXPECT_EQ(views::Button::STATE_HOVERED, close_button()->state());
414 } 415 }
415 416
416 } // namespace test 417 } // namespace test
417 } // namespace ash 418 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/caption_buttons/frame_caption_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698