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

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

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/geolocation/geolocation_browsertest.cc
===================================================================
--- trunk/src/chrome/browser/geolocation/geolocation_browsertest.cc (revision 238401)
+++ trunk/src/chrome/browser/geolocation/geolocation_browsertest.cc (working copy)
@@ -141,12 +141,12 @@
const std::string& iframe_xpath);
bool has_infobar() const { return !!infobar_; }
- InfoBar* infobar() { return infobar_; }
+ InfoBarDelegate* infobar() { return infobar_; }
private:
content::NotificationRegistrar registrar_;
bool wait_for_infobar_;
- InfoBar* infobar_;
+ InfoBarDelegate* infobar_;
bool navigation_started_;
bool navigation_completed_;
std::string javascript_response_;
@@ -184,8 +184,8 @@
const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) {
infobar_ = content::Details<InfoBar::AddedDetails>(details).ptr();
- ASSERT_FALSE(infobar_->delegate()->GetIcon().IsEmpty());
- ASSERT_TRUE(infobar_->delegate()->AsConfirmInfoBarDelegate());
+ ASSERT_FALSE(infobar_->GetIcon().IsEmpty());
+ ASSERT_TRUE(infobar_->AsConfirmInfoBarDelegate());
} else if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) {
content::Details<DomOperationNotificationDetails> dom_op_details(details);
javascript_response_ = dom_op_details->json;
@@ -298,7 +298,7 @@
void NotifyGeoposition(double latitude, double longitude);
private:
- InfoBar* infobar_;
+ InfoBarDelegate* infobar_;
Browser* current_browser_;
// path element of a URL referencing the html content for this test.
std::string html_for_tests_;
@@ -407,9 +407,9 @@
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&web_contents->GetController()));
if (allowed)
- infobar_->delegate()->AsConfirmInfoBarDelegate()->Accept();
+ infobar_->AsConfirmInfoBarDelegate()->Accept();
else
- infobar_->delegate()->AsConfirmInfoBarDelegate()->Cancel();
+ infobar_->AsConfirmInfoBarDelegate()->Cancel();
observer.Wait();
}

Powered by Google App Engine
This is Rietveld 408576698