diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 14:26:31 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 14:26:31 +0000 |
commit | 8c899745075cbd3a3abead137ca0b151529898a2 (patch) | |
tree | c0b33b7b1a0a1b7b430060b78b165e79700d4972 /chrome/browser/browser_uitest.cc | |
parent | 03f7f4f98a9c241ed05862158e10120bfe64472f (diff) | |
download | chromium_src-8c899745075cbd3a3abead137ca0b151529898a2.zip chromium_src-8c899745075cbd3a3abead137ca0b151529898a2.tar.gz chromium_src-8c899745075cbd3a3abead137ca0b151529898a2.tar.bz2 |
[GTTF] Add more NULL-checks to UI tests that were lacking them to avoid crashiness.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/841002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index fdde99d..55cb332 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -34,6 +34,7 @@ class BrowserTest : public UITest { void TerminateBrowser() { #if defined(OS_WIN) scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + ASSERT_TRUE(browser.get()); ASSERT_TRUE(browser->TerminateSession()); #elif defined(OS_POSIX) // There's nothing to do here if the browser is not running. @@ -136,6 +137,7 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { ASSERT_TRUE(NULL != server.get()); FilePath test_file(test_data_directory_); scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + ASSERT_TRUE(window.get()); scoped_refptr<TabProxy> tab(window->GetActiveTab()); ASSERT_TRUE(tab.get()); @@ -185,6 +187,7 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { ASSERT_TRUE(NULL != server.get()); FilePath test_file(test_data_directory_); scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); + ASSERT_TRUE(window.get()); scoped_refptr<TabProxy> tab(window->GetActiveTab()); ASSERT_TRUE(tab.get()); |