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

Side by Side Diff: ui/views/widget/native_widget_win_unittest.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/tooltip_manager_win.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 "ui/views/widget/native_widget_win.h" 5 #include "ui/views/widget/native_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 15 matching lines...) Expand all
26 26
27 // Create a simple widget win. The caller is responsible for taking ownership 27 // Create a simple widget win. The caller is responsible for taking ownership
28 // of the returned value. 28 // of the returned value.
29 NativeWidgetWin* CreateNativeWidgetWin(); 29 NativeWidgetWin* CreateNativeWidgetWin();
30 30
31 void RunPendingMessages() { 31 void RunPendingMessages() {
32 message_loop_.RunUntilIdle(); 32 message_loop_.RunUntilIdle();
33 } 33 }
34 34
35 private: 35 private:
36 MessageLoopForUI message_loop_; 36 base::MessageLoopForUI message_loop_;
37 ui::ScopedOleInitializer ole_initializer_; 37 ui::ScopedOleInitializer ole_initializer_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWinTest); 39 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWinTest);
40 }; 40 };
41 41
42 NativeWidgetWin* NativeWidgetWinTest::CreateNativeWidgetWin() { 42 NativeWidgetWin* NativeWidgetWinTest::CreateNativeWidgetWin() {
43 scoped_ptr<Widget> widget(new Widget); 43 scoped_ptr<Widget> widget(new Widget);
44 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); 44 Widget::InitParams params(Widget::InitParams::TYPE_POPUP);
45 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 45 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
46 params.bounds = gfx::Rect(50, 50, 650, 650); 46 params.bounds = gfx::Rect(50, 50, 650, 650);
(...skipping 27 matching lines...) Expand all
74 EXPECT_FALSE(IsZoomed(window->GetNativeView())); 74 EXPECT_FALSE(IsZoomed(window->GetNativeView()));
75 EXPECT_FALSE(window->IsActive()); 75 EXPECT_FALSE(window->IsActive());
76 76
77 // Cleanup. 77 // Cleanup.
78 window->CloseNow(); 78 window->CloseNow();
79 window2->CloseNow(); 79 window2->CloseNow();
80 } 80 }
81 81
82 } // namespace 82 } // namespace
83 } // namespace views 83 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/tooltip_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698