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

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

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run the later parts of startup as UI thread tasks - patch for Yaron's comments Created 7 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 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 66918ab1679ab56a341db812b493879d2a8a6ca6..57ba333ac6e544a66d7972af8a6ff42a69ac4c54 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
+#include "content/public/common/startup_task_runner.h"
#include "content/public/test/test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -97,7 +98,11 @@ void BrowserTestBase::SetUp() {
SetUpInProcessBrowserTestFixture();
#if defined(OS_ANDROID)
- BrowserMainRunner::Create()->Initialize(params);
+ scoped_refptr<content::StartupTaskRunner> startup_task_runner =
+ make_scoped_refptr(new content::StartupTaskRunner(
+ content::StartupTaskRunner::IMMEDIATE, NULL));
+
+ BrowserMainRunner::Create()->Initialize(params, startup_task_runner);
// We are done running the test by now. During teardown we
// need to be able to perform IO.
base::ThreadRestrictions::SetIOAllowed(true);

Powered by Google App Engine
This is Rietveld 408576698