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

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

Issue 311943002: Same shutdown process for content_browsertests on android/non android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another merge attempt. Created 6 years, 6 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 | « content/gpu/in_process_gpu_thread.cc ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a5575092f498be01108423b13cfb24e2a0a4274..a788f5e6295eaeb3a810d5c3af58cbb2a83f1f08 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -239,14 +239,10 @@ void BrowserTestBase::SetUp() {
MainFunctionParams params(*command_line);
params.ui_task = ui_task;
// TODO(phajdan.jr): Check return code, http://crbug.com/374738 .
- BrowserMainRunner::Create()->Initialize(params);
- // We are done running the test by now. During teardown we
- // need to be able to perform IO.
- base::ThreadRestrictions::SetIOAllowed(true);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed),
- true));
+ scoped_ptr<BrowserMainRunner> runner(BrowserMainRunner::Create());
+ runner->Initialize(params);
+ runner->Run();
+ runner->Shutdown();
#else
GetContentMainParams()->ui_task = ui_task;
EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams()));
« no previous file with comments | « content/gpu/in_process_gpu_thread.cc ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698