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

Unified Diff: content/public/test/browser_test_base.cc

Issue 2601843002: Convert more test helpers to base::RunLoop, fix page title checks. (Closed)
Patch Set: Remove unneeded call. Created 3 years, 11 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
Index: content/public/test/browser_test_base.cc
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index 2333cceee12396f5938785a2917750cb748aeeef..cdfde3472a60256e4106913da06c327079886974 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -341,7 +341,14 @@ void BrowserTestBase::ProxyRunTestOnMainThreadLoop() {
TracingController::StartTracingDoneCallback());
}
- RunTestOnMainThreadLoop();
+ {
+ // This can be called from a posted task. Allow nested tasks here, because
+ // otherwise the test body will have to do it in order to use RunLoop for
+ // waiting.
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
+ RunTestOnMainThreadLoop();
+ }
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTracing)) {

Powered by Google App Engine
This is Rietveld 408576698