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

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

Issue 11186010: Update geolocation infobar to handle Android system settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Failed to upload Created 8 years, 2 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/chrome_geolocation_permission_context_unittest.cc
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index f92626976d90fbfa39393bfe3bbfdb47f7fe4889..cea907c5e0343a737c853b974cda75da2123193f 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -290,32 +290,6 @@ TEST_F(GeolocationPermissionContextTests, SinglePermission) {
infobar_0->InfoBarClosed();
}
-#if defined(OS_ANDROID)
-TEST_F(GeolocationPermissionContextTests, GeolocationEnabledDisabled) {
- profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_GEOLOCATION,
- CONTENT_SETTING_ALLOW);
-
- // Check that the request is denied with preference disabled,
- // even though the default policy allows it.
- GURL requesting_frame("http://www.example.com/geolocation");
- NavigateAndCommit(requesting_frame);
- EXPECT_EQ(0U, infobar_tab_helper()->GetInfoBarCount());
- profile()->GetPrefs()->SetBoolean(prefs::kGeolocationEnabled, false);
- RequestGeolocationPermission(
- process_id(), render_id(), bridge_id(), requesting_frame);
- ASSERT_EQ(0U, infobar_tab_helper()->GetInfoBarCount());
- CheckPermissionMessageSent(bridge_id(), false);
-
- // Reenable the preference and check that the request now goes though.
- profile()->GetPrefs()->SetBoolean(prefs::kGeolocationEnabled, true);
- RequestGeolocationPermission(
- process_id(), render_id(), bridge_id() + 1, requesting_frame);
- ASSERT_EQ(0U, infobar_tab_helper()->GetInfoBarCount());
- CheckPermissionMessageSent(bridge_id() + 1, true);
-}
-#endif
-
TEST_F(GeolocationPermissionContextTests, QueuedPermission) {
GURL requesting_frame_0("http://www.example.com/geolocation");
GURL requesting_frame_1("http://www.example-2.com/geolocation");

Powered by Google App Engine
This is Rietveld 408576698