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

Side by Side Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fixes redux Created 7 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 content::NotificationService::AllSources()); 168 content::NotificationService::AllSources());
169 } 169 }
170 } 170 }
171 171
172 void GeolocationNotificationObserver::Observe( 172 void GeolocationNotificationObserver::Observe(
173 int type, 173 int type,
174 const content::NotificationSource& source, 174 const content::NotificationSource& source,
175 const content::NotificationDetails& details) { 175 const content::NotificationDetails& details) {
176 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) { 176 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) {
177 infobar_ = content::Details<InfoBarAddedDetails>(details).ptr(); 177 infobar_ = content::Details<InfoBarAddedDetails>(details).ptr();
178 ASSERT_TRUE(infobar_->GetIcon()); 178 ASSERT_FALSE(infobar_->GetIcon().IsEmpty());
179 ASSERT_TRUE(infobar_->AsConfirmInfoBarDelegate()); 179 ASSERT_TRUE(infobar_->AsConfirmInfoBarDelegate());
180 } else if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) { 180 } else if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) {
181 content::Details<DomOperationNotificationDetails> dom_op_details(details); 181 content::Details<DomOperationNotificationDetails> dom_op_details(details);
182 javascript_response_ = dom_op_details->json; 182 javascript_response_ = dom_op_details->json;
183 LOG(WARNING) << "javascript_response " << javascript_response_; 183 LOG(WARNING) << "javascript_response " << javascript_response_;
184 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED || 184 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED ||
185 type == content::NOTIFICATION_LOAD_START) { 185 type == content::NOTIFICATION_LOAD_START) {
186 navigation_started_ = true; 186 navigation_started_ = true;
187 } else if (type == content::NOTIFICATION_LOAD_STOP) { 187 } else if (type == content::NOTIFICATION_LOAD_STOP) {
188 if (navigation_started_) { 188 if (navigation_started_) {
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 AddGeolocationWatch(false); 734 AddGeolocationWatch(false);
735 735
736 std::string script = 736 std::string script =
737 "window.domAutomationController.send(window.close());"; 737 "window.domAutomationController.send(window.close());";
738 bool result = 738 bool result =
739 content::ExecuteScript( 739 content::ExecuteScript(
740 current_browser_->tab_strip_model()->GetActiveWebContents(), 740 current_browser_->tab_strip_model()->GetActiveWebContents(),
741 script); 741 script);
742 EXPECT_EQ(result, true); 742 EXPECT_EQ(result, true);
743 } 743 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698