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

Side by Side Diff: content/public/test/browser_test_base.cc

Issue 319053006: Calling Shutdown() for Android content_browsertests. Removed webrtc test hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced boilerplate code w/BrowserMain() invocation. 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 unified diff | Download patch
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/browser_test_base.h" 5 #include "content/public/test/browser_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 SetUpInProcessBrowserTestFixture(); 232 SetUpInProcessBrowserTestFixture();
233 233
234 base::Closure* ui_task = 234 base::Closure* ui_task =
235 new base::Closure( 235 new base::Closure(
236 base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this)); 236 base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this));
237 237
238 #if defined(OS_ANDROID) 238 #if defined(OS_ANDROID)
239 MainFunctionParams params(*command_line); 239 MainFunctionParams params(*command_line);
240 params.ui_task = ui_task; 240 params.ui_task = ui_task;
241 // TODO(phajdan.jr): Check return code, http://crbug.com/374738 . 241 // TODO(phajdan.jr): Check return code, http://crbug.com/374738 .
242 BrowserMainRunner::Create()->Initialize(params); 242 BrowserMain(params);
243 // We are done running the test by now. During teardown we
244 // need to be able to perform IO.
245 base::ThreadRestrictions::SetIOAllowed(true);
246 BrowserThread::PostTask(
247 BrowserThread::IO, FROM_HERE,
248 base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed),
249 true));
250 #else 243 #else
251 GetContentMainParams()->ui_task = ui_task; 244 GetContentMainParams()->ui_task = ui_task;
252 EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams())); 245 EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams()));
253 #endif 246 #endif
254 TearDownInProcessBrowserTestFixture(); 247 TearDownInProcessBrowserTestFixture();
255 } 248 }
256 249
257 void BrowserTestBase::TearDown() { 250 void BrowserTestBase::TearDown() {
258 } 251 }
259 252
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 use_software_compositing_ = true; 294 use_software_compositing_ = true;
302 } 295 }
303 296
304 bool BrowserTestBase::UsingOSMesa() const { 297 bool BrowserTestBase::UsingOSMesa() const {
305 CommandLine* cmd = CommandLine::ForCurrentProcess(); 298 CommandLine* cmd = CommandLine::ForCurrentProcess();
306 return cmd->GetSwitchValueASCII(switches::kUseGL) == 299 return cmd->GetSwitchValueASCII(switches::kUseGL) ==
307 gfx::kGLImplementationOSMesaName; 300 gfx::kGLImplementationOSMesaName;
308 } 301 }
309 302
310 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698