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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh Created 7 years, 6 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
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/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.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/display_manager_test_api.h" 9 #include "ash/test/display_manager_test_api.h"
10 #include "ash/test/shell_test_api.h" 10 #include "ash/test/shell_test_api.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #endif 83 #endif
84 84
85 aura::Env::DeleteInstance(); 85 aura::Env::DeleteInstance();
86 ui::TextInputTestSupport::Shutdown(); 86 ui::TextInputTestSupport::Shutdown();
87 87
88 zero_duration_mode_.reset(); 88 zero_duration_mode_.reset();
89 } 89 }
90 90
91 void AshTestHelper::RunAllPendingInMessageLoop() { 91 void AshTestHelper::RunAllPendingInMessageLoop() {
92 #if !defined(OS_MACOSX) 92 #if !defined(OS_MACOSX)
93 DCHECK(MessageLoopForUI::current() == message_loop_); 93 DCHECK(base::MessageLoopForUI::current() == message_loop_);
94 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 94 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
95 run_loop.RunUntilIdle(); 95 run_loop.RunUntilIdle();
96 #endif 96 #endif
97 } 97 }
98 98
99 aura::RootWindow* AshTestHelper::CurrentContext() { 99 aura::RootWindow* AshTestHelper::CurrentContext() {
100 aura::RootWindow* root_window = Shell::GetActiveRootWindow(); 100 aura::RootWindow* root_window = Shell::GetActiveRootWindow();
101 if (!root_window) 101 if (!root_window)
102 root_window = Shell::GetPrimaryRootWindow(); 102 root_window = Shell::GetPrimaryRootWindow();
103 DCHECK(root_window); 103 DCHECK(root_window);
104 return root_window; 104 return root_window;
105 } 105 }
106 106
107 } // namespace test 107 } // namespace test
108 } // namespace ash 108 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | base/deferred_sequenced_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698