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

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

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
Index: content/public/test/browser_test_base.h
diff --git a/content/public/test/browser_test_base.h b/content/public/test/browser_test_base.h
index 7e36ce64411c4f12e1d4d7ce9712c139d481fb55..1514c65062ee50ec668b1c6f37e472e98e7c7f10 100644
--- a/content/public/test/browser_test_base.h
+++ b/content/public/test/browser_test_base.h
@@ -81,6 +81,9 @@ class BrowserTestBase : public testing::Test {
// (RunTestOnMainThread), quits the browsers and returns.
virtual void RunTestOnMainThreadLoop() = 0;
+ // Sets expected browser exit code, in case it's different than 0 (success).
+ void set_expected_exit_code(int code) { expected_exit_code_ = code; }
+
// Returns the testing server. Guaranteed to be non-NULL.
// TODO(phajdan.jr): Remove test_server accessor (http://crbug.com/96594).
const net::SpawnedTestServer* test_server() const {
@@ -139,6 +142,9 @@ class BrowserTestBase : public testing::Test {
// Host resolver used during tests.
scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_;
+ // Expected exit code (default is 0).
+ int expected_exit_code_;
+
// When true, the compositor will produce pixel output that can be read back
// for pixel tests.
bool enable_pixel_output_;
« no previous file with comments | « chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698