| 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)) {
|
|
|