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

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

Issue 305473005: Check browser's exit code in BrowserTestBase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 6 years, 7 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/public/test/browser_test_base.h ('k') | no next file » | 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 c6216d49dfe03ea343d46684c27f659a6473f066..3a5575092f498be01108423b13cfb24e2a0a4274 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -123,7 +123,9 @@ class LocalHostResolverProc : public net::HostResolverProc {
extern int BrowserMain(const MainFunctionParams&);
BrowserTestBase::BrowserTestBase()
- : enable_pixel_output_(false), use_software_compositing_(false) {
+ : expected_exit_code_(0),
+ enable_pixel_output_(false),
+ use_software_compositing_(false) {
#if defined(OS_MACOSX)
base::mac::SetOverrideAmIBundled(true);
#endif
@@ -236,6 +238,7 @@ void BrowserTestBase::SetUp() {
#if defined(OS_ANDROID)
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.
@@ -246,7 +249,7 @@ void BrowserTestBase::SetUp() {
true));
#else
GetContentMainParams()->ui_task = ui_task;
- ContentMain(*GetContentMainParams());
+ EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams()));
#endif
TearDownInProcessBrowserTestFixture();
}
« no previous file with comments | « content/public/test/browser_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698