diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:47 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:47 +0000 |
commit | 5c943180e410b2a4e76f93e1612985cdab407e8c (patch) | |
tree | 6aef67f089f4ecbd73fbdac524f7627ecfb6b6a2 /chrome/browser/browser_uitest.cc | |
parent | 23512f4ba83ab011aac513972290aa30b26785cd (diff) | |
download | chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.zip chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.tar.gz chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.tar.bz2 |
Sprinkle some defensiveness into the UI tests so that they don't explode if the proxy doesn't respond (e.g., due to a timeout).
BUG=none
TEST=Hopefully the Mac valgrind bots will more reliably run all their tests (although there are likely more issues like this lurking).
Review URL: http://codereview.chromium.org/149281
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 108273e..3b14290 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -198,6 +198,7 @@ TEST_F(BrowserTest, DISABLED_JavascriptAlertActivatesTab) { int javascript_tab_index; ASSERT_TRUE(window->GetActiveTabIndex(&javascript_tab_index)); scoped_refptr<TabProxy> javascript_tab = window->GetActiveTab(); + ASSERT_TRUE(javascript_tab.get()); // Switch back to the starting tab, then send the second tab a javascript // alert, which should force it to become active. ASSERT_TRUE(window->ActivateTab(start_index)); @@ -226,6 +227,7 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { FilePath test_file(test_data_directory_); scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); scoped_refptr<TabProxy> tab(window->GetActiveTab()); + ASSERT_TRUE(tab.get()); // Start with a file:// url test_file = test_file.AppendASCII("title2.html"); @@ -268,6 +270,7 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { FilePath test_file(test_data_directory_); scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); scoped_refptr<TabProxy> tab(window->GetActiveTab()); + ASSERT_TRUE(tab.get()); // Start with a file:// url test_file = test_file.AppendASCII("title2.html"); @@ -342,6 +345,7 @@ TEST_F(ShowModalDialogTest, BasicTest) { scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(1); scoped_refptr<TabProxy> tab = browser->GetActiveTab(); + ASSERT_TRUE(tab.get()); std::wstring title; ASSERT_TRUE(tab->GetTabTitle(&title)); |