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

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

Issue 1004093004: GeolocationBrowserTest: only put bubble in test mode when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 174 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
175 content::NotificationService::AllSources()); 175 content::NotificationService::AllSources());
176 } else if (!wait_for_prompt) { 176 } else if (!wait_for_prompt) {
177 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, 177 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
178 content::NotificationService::AllSources()); 178 content::NotificationService::AllSources());
179 registrar_.Add(this, content::NOTIFICATION_LOAD_START, 179 registrar_.Add(this, content::NOTIFICATION_LOAD_START,
180 content::NotificationService::AllSources()); 180 content::NotificationService::AllSources());
181 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, 181 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
182 content::NotificationService::AllSources()); 182 content::NotificationService::AllSources());
183 } 183 }
184 mock_view_->SetBrowserTest(true); 184 if (PermissionBubbleManager::Enabled())
185 mock_view_->SetBrowserTest(true);
185 } 186 }
186 187
187 GeolocationNotificationObserver::~GeolocationNotificationObserver() { 188 GeolocationNotificationObserver::~GeolocationNotificationObserver() {
188 } 189 }
189 190
190 void GeolocationNotificationObserver::Observe( 191 void GeolocationNotificationObserver::Observe(
191 int type, 192 int type,
192 const content::NotificationSource& source, 193 const content::NotificationSource& source,
193 const content::NotificationDetails& details) { 194 const content::NotificationDetails& details) {
194 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) { 195 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) {
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 ->GetLastUsage(current_url().GetOrigin(), 897 ->GetLastUsage(current_url().GetOrigin(),
897 current_url().GetOrigin(), 898 current_url().GetOrigin(),
898 CONTENT_SETTINGS_TYPE_GEOLOCATION) 899 CONTENT_SETTINGS_TYPE_GEOLOCATION)
899 .ToDoubleT(), 900 .ToDoubleT(),
900 13); 901 13);
901 } 902 }
902 903
903 INSTANTIATE_TEST_CASE_P(GeolocationBrowserTestWithParams, 904 INSTANTIATE_TEST_CASE_P(GeolocationBrowserTestWithParams,
904 GeolocationBrowserTest, 905 GeolocationBrowserTest,
905 testing::Values(false)); 906 testing::Values(false));
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698