OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/widget_win.h" | 5 #include "views/widget/widget_win.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 message_loop_.RunAllPending(); | 36 message_loop_.RunAllPending(); |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 MessageLoopForUI message_loop_; | 40 MessageLoopForUI message_loop_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(WidgetWinTest); | 42 DISALLOW_COPY_AND_ASSIGN(WidgetWinTest); |
43 }; | 43 }; |
44 | 44 |
45 WidgetWin* WidgetWinTest::CreateWidgetWin() { | 45 WidgetWin* WidgetWinTest::CreateWidgetWin() { |
46 scoped_ptr<Widget> widget(Widget::CreateWidget()); | 46 scoped_ptr<Widget> widget(new Widget); |
47 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); | 47 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); |
48 params.delete_on_destroy = false; | 48 params.delete_on_destroy = false; |
49 params.bounds = gfx::Rect(50, 50, 650, 650); | 49 params.bounds = gfx::Rect(50, 50, 650, 650); |
50 widget->Init(params); | 50 widget->Init(params); |
51 return static_cast<WidgetWin*>(widget.release()->native_widget()); | 51 return static_cast<WidgetWin*>(widget.release()->native_widget()); |
52 } | 52 } |
53 | 53 |
54 TEST_F(WidgetWinTest, ZoomWindow) { | 54 TEST_F(WidgetWinTest, ZoomWindow) { |
55 scoped_ptr<WidgetWin> window(CreateWidgetWin()); | 55 scoped_ptr<WidgetWin> window(CreateWidgetWin()); |
56 window->ShowWindow(SW_HIDE); | 56 window->ShowWindow(SW_HIDE); |
(...skipping 20 matching lines...) Expand all Loading... |
77 EXPECT_FALSE(window->IsZoomed()); | 77 EXPECT_FALSE(window->IsZoomed()); |
78 EXPECT_FALSE(window->IsActive()); | 78 EXPECT_FALSE(window->IsActive()); |
79 | 79 |
80 // Cleanup. | 80 // Cleanup. |
81 window->CloseNow(); | 81 window->CloseNow(); |
82 window2->CloseNow(); | 82 window2->CloseNow(); |
83 } | 83 } |
84 | 84 |
85 } // namespace | 85 } // namespace |
86 } // namespace views | 86 } // namespace views |
OLD | NEW |