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

Unified Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 7810002: Move infobar handling to a tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 4 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: chrome/browser/geolocation/geolocation_browsertest.cc
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 43d89bd01113794cfb68b0d4cdded7b0b207694d..c80f49cb499b77a1d5bf06e375feed6ccdb25964 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/dom_operation_notification_details.h"
#include "chrome/browser/geolocation/geolocation_settings_state.h"
+#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/infobar.h"
@@ -331,7 +332,7 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
observer.Wait();
}
- tab_contents_wrapper->RemoveInfoBar(infobar_);
+ tab_contents_wrapper->infobar_tab_helper()->RemoveInfoBar(infobar_);
LOG(WARNING) << "infobar response set";
infobar_ = NULL;
EXPECT_GT(settings_state.state_map().size(), state_map_size);
@@ -576,12 +577,12 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest,
iframe_xpath_ = L"//iframe[@id='iframe_1']";
AddGeolocationWatch(true);
- size_t num_infobars_before_cancel =
- current_browser_->GetSelectedTabContentsWrapper()->infobar_count();
+ InfoBarTabHelper* infobar_helper = current_browser_->
+ GetSelectedTabContentsWrapper()->infobar_tab_helper();
+ size_t num_infobars_before_cancel = infobar_helper->infobar_count();
// Change the iframe, and ensure the infobar is gone.
IFrameLoader change_iframe_1(current_browser_, 1, current_url_);
- size_t num_infobars_after_cancel =
- current_browser_->GetSelectedTabContentsWrapper()->infobar_count();
+ size_t num_infobars_after_cancel = infobar_helper->infobar_count();
EXPECT_EQ(num_infobars_before_cancel, num_infobars_after_cancel + 1);
}

Powered by Google App Engine
This is Rietveld 408576698