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

Unified Diff: chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc

Issue 23991002: Fix flaky CountingPolicyTest.CapReturns test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Defined WaitOnThread Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/activity_log/counting_policy_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
index 56e5146b6e37ea060a9556edf8c631bbc5da530f..bd0286d1e1005735f95962d2c3668efe3caa4f2a 100644
--- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
@@ -83,7 +83,7 @@ class FullStreamUIPolicyTest : public testing::Test {
base::CancelableClosure timeout(
base::Bind(&FullStreamUIPolicyTest::TimeoutCallback));
base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(5));
+ FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(8));
// Wait for results; either the checker or the timeout callbacks should
// cause the main loop to exit.
@@ -115,12 +115,12 @@ class FullStreamUIPolicyTest : public testing::Test {
checker,
base::MessageLoop::current()->QuitClosure()));
- // Set up a timeout that will trigger after 5 seconds; if we haven't
+ // Set up a timeout that will trigger after 8 seconds; if we haven't
// received any results by then assume that the test is broken.
base::CancelableClosure timeout(
base::Bind(&FullStreamUIPolicyTest::TimeoutCallback));
base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(5));
+ FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(8));
// Wait for results; either the checker or the timeout callbacks should
// cause the main loop to exit.
@@ -659,7 +659,14 @@ TEST_F(FullStreamUIPolicyTest, CapReturns) {
base::StringPrintf("apicall_%d", i));
policy->ProcessAction(action);
}
+
policy->Flush();
+ BrowserThread::PostTaskAndReply(
+ thread,
+ FROM_HERE,
+ base::Bind(&base::DoNothing),
+ base::MessageLoop::current()->QuitClosure());
+ base::MessageLoop::current()->Run();
Matt Perry 2013/09/05 18:49:19 nit: use RunLoop instead. see https://code.google.
CheckReadFilteredData(
policy,
« no previous file with comments | « chrome/browser/extensions/activity_log/counting_policy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698