summaryrefslogtreecommitdiffstats
path: root/base/message_pump_dispatcher.h
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 22:57:30 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 22:57:30 +0000
commit8e937c1e6a1cf0bdce081324965e105a6b17a3fc (patch)
treeffec2c670d3ceb188c0c1244b846b15adbe7838e /base/message_pump_dispatcher.h
parented50d3ee0ed2e26da0ff805dc52ee0c03f80df2e (diff)
downloadchromium_src-8e937c1e6a1cf0bdce081324965e105a6b17a3fc.zip
chromium_src-8e937c1e6a1cf0bdce081324965e105a6b17a3fc.tar.gz
chromium_src-8e937c1e6a1cf0bdce081324965e105a6b17a3fc.tar.bz2
Add base::RunLoop and update ui_test_utils to use it to reduce flakiness
Timeout flakiness has been observed in multiple tests that use Quit. This changes various test utility APIs to use QuitNow via base::RunLoop instead. Some instances of Quit are left as-is where it appears they may have a use case. The ui_test_utils QuitThisRunLoop function does a safer form of MessageLoop::QuitWhenIdle that allows a few generations of tasks to run before actually quitting the MessageLoop. This addresses the design assumptions of many existing tests while hopefully reducing flaky timeouts by moving away from QuitWhenIdle. This fixes throughput_tests.cc which is currently timing out on Mac. BUG=124906,130141,131220,128305,132932 Review URL: https://chromiumcodereview.appspot.com/10479018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144824 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_dispatcher.h')
-rw-r--r--base/message_pump_dispatcher.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/base/message_pump_dispatcher.h b/base/message_pump_dispatcher.h
index 685e92b..b8efd32 100644
--- a/base/message_pump_dispatcher.h
+++ b/base/message_pump_dispatcher.h
@@ -11,12 +11,11 @@
namespace base {
-// Dispatcher is used during a nested invocation of Run to dispatch
-// events when |MessageLoop::RunWithDispatcher| is invoked. If
-// |MessageLoop::Run| is invoked, MessageLoop does not dispatch events
-// (or invoke TranslateMessage), rather every message is passed to
-// Dispatcher's Dispatch method for dispatch. It is up to the
-// Dispatcher whether or not to dispatch the event.
+// Dispatcher is used during a nested invocation of Run to dispatch events when
+// |RunLoop(dispatcher).Run()| is used. If |RunLoop().Run()| is invoked,
+// MessageLoop does not dispatch events (or invoke TranslateMessage), rather
+// every message is passed to Dispatcher's Dispatch method for dispatch. It is
+// up to the Dispatcher whether or not to dispatch the event.
//
// The nested loop is exited by either posting a quit, or returning false
// from Dispatch.