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

Side by Side Diff: ui/aura/test/aura_test_helper.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: phajdan feedback Created 8 years, 5 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/aura/env.h ('k') | ui/views/controls/menu/menu_controller.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/aura/test/aura_test_helper.h" 5 #include "ui/aura/test/aura_test_helper.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/run_loop.h"
8 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
10 #include "ui/aura/focus_manager.h" 11 #include "ui/aura/focus_manager.h"
11 #include "ui/aura/monitor_manager.h" 12 #include "ui/aura/monitor_manager.h"
12 #include "ui/aura/root_window.h" 13 #include "ui/aura/root_window.h"
13 #include "ui/aura/shared/root_window_capture_client.h" 14 #include "ui/aura/shared/root_window_capture_client.h"
14 #include "ui/aura/single_monitor_manager.h" 15 #include "ui/aura/single_monitor_manager.h"
15 #include "ui/aura/test/test_activation_client.h" 16 #include "ui/aura/test/test_activation_client.h"
16 #include "ui/aura/test/test_screen.h" 17 #include "ui/aura/test/test_screen.h"
17 #include "ui/aura/test/test_stacking_client.h" 18 #include "ui/aura/test/test_stacking_client.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 stacking_client_.reset(); 72 stacking_client_.reset();
72 test_activation_client_.reset(); 73 test_activation_client_.reset();
73 root_window_capture_client_.reset(); 74 root_window_capture_client_.reset();
74 focus_manager_.reset(); 75 focus_manager_.reset();
75 root_window_.reset(); 76 root_window_.reset();
76 aura::Env::DeleteInstance(); 77 aura::Env::DeleteInstance();
77 } 78 }
78 79
79 void AuraTestHelper::RunAllPendingInMessageLoop() { 80 void AuraTestHelper::RunAllPendingInMessageLoop() {
80 #if !defined(OS_MACOSX) 81 #if !defined(OS_MACOSX)
81 message_loop_->RunAllPendingWithDispatcher( 82 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
82 Env::GetInstance()->GetDispatcher()); 83 // use run_loop.QuitClosure().
84 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher());
85 run_loop.RunUntilIdle();
83 #endif 86 #endif
84 } 87 }
85 88
86 } // namespace test 89 } // namespace test
87 } // namespace aura 90 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/env.h ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698