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

Side by Side Diff: ash/wm/custom_frame_view_ash_unittest.cc

Issue 11795004: Continue threading context through unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « ash/test/ash_test_base.cc ('k') | ash/wm/frame_painter_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/custom_frame_view_ash.h" 5 #include "ash/wm/custom_frame_view_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/maximize_bubble_controller.h" 9 #include "ash/wm/maximize_bubble_controller.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace 71 } // namespace
72 72
73 class CustomFrameViewAshTest : public ash::test::AshTestBase { 73 class CustomFrameViewAshTest : public ash::test::AshTestBase {
74 public: 74 public:
75 CustomFrameViewAshTest() {} 75 CustomFrameViewAshTest() {}
76 virtual ~CustomFrameViewAshTest() {} 76 virtual ~CustomFrameViewAshTest() {}
77 77
78 views::Widget* CreateWidget() { 78 views::Widget* CreateWidget() {
79 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 79 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
80 views::Widget* widget = new views::Widget; 80 views::Widget* widget = new views::Widget;
81 params.context = CurrentContext();
81 params.delegate = new TestWidgetDelegate; 82 params.delegate = new TestWidgetDelegate;
82 widget->Init(params); 83 widget->Init(params);
83 widget->Show(); 84 widget->Show();
84 return widget; 85 return widget;
85 } 86 }
86 87
87 CustomFrameViewAsh* custom_frame_view_ash(views::Widget* widget) const { 88 CustomFrameViewAsh* custom_frame_view_ash(views::Widget* widget) const {
88 return static_cast<CustomFrameViewAsh*>(widget->non_client_view()-> 89 return static_cast<CustomFrameViewAsh*>(widget->non_client_view()->
89 frame_view()); 90 frame_view());
90 } 91 }
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 692
692 // We simulate the keystroke by calling minimizeWindow directly. 693 // We simulate the keystroke by calling minimizeWindow directly.
693 wm::MinimizeWindow(window); 694 wm::MinimizeWindow(window);
694 695
695 EXPECT_TRUE(ash::wm::IsWindowMinimized(window)); 696 EXPECT_TRUE(ash::wm::IsWindowMinimized(window));
696 EXPECT_FALSE(maximize_button->maximizer()); 697 EXPECT_FALSE(maximize_button->maximizer());
697 } 698 }
698 699
699 } // namespace internal 700 } // namespace internal
700 } // namespace ash 701 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/frame_painter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698