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

Unified Diff: chrome/browser/browser_uitest.cc

Issue 149281: Sprinkle some defensiveness into the UI tests so that they don't explode if t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | chrome/browser/crash_recovery_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_uitest.cc
===================================================================
--- chrome/browser/browser_uitest.cc (revision 19956)
+++ chrome/browser/browser_uitest.cc (working copy)
@@ -198,6 +198,7 @@
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 @@
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 @@
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 @@
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));
« no previous file with comments | « no previous file | chrome/browser/crash_recovery_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698