summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_in_page_controller_uitest.cc
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:11:13 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:11:13 +0000
commit969ff790df011552be3e8bf70dacd4bf2bd10aa5 (patch)
treeff5882d48676b5a113ca55e97f29af36581dc163 /chrome/browser/find_in_page_controller_uitest.cc
parentb588b77cec996e3f017344343f85bd5d1fdbb5eb (diff)
downloadchromium_src-969ff790df011552be3e8bf70dacd4bf2bd10aa5.zip
chromium_src-969ff790df011552be3e8bf70dacd4bf2bd10aa5.tar.gz
chromium_src-969ff790df011552be3e8bf70dacd4bf2bd10aa5.tar.bz2
We should not EXPECT to get a browser object or a window object, we should ASSERT that we got it (which ends the test on NULL pointers). Otherwise we continue on and crash when we try to use these pointers, such as when passing it into GetBrowserForWindow.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_in_page_controller_uitest.cc')
-rw-r--r--chrome/browser/find_in_page_controller_uitest.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/find_in_page_controller_uitest.cc b/chrome/browser/find_in_page_controller_uitest.cc
index c20a220..821cdfe 100644
--- a/chrome/browser/find_in_page_controller_uitest.cc
+++ b/chrome/browser/find_in_page_controller_uitest.cc
@@ -129,11 +129,8 @@ TEST_F(FindInPageControllerTest, DISABLED_FindMovesOnTabClose_Issue1343052) {
scoped_ptr<TabProxy> tabA(GetActiveTab());
ASSERT_TRUE(tabA->NavigateToURL(url));
- scoped_ptr<WindowProxy> window(automation()->GetActiveWindow());
- EXPECT_TRUE(window.get() != NULL);
-
- scoped_ptr<BrowserProxy> browser(
- automation()->GetBrowserForWindow(window.get()));
+ scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow());
+ ASSERT_TRUE(browser.get() != NULL);
// Toggle the bookmark bar state.
browser->ApplyAccelerator(IDC_SHOW_BOOKMARKS_BAR);