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

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

Issue 441883003: Simplify Android geolocation permission checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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_permission_context_unittest.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
index a0ebc1189f941c237cde7d824bc5a5a5f534e69a..9ae3a305414dee56dd96abfacef9508e28c93f37 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
@@ -304,18 +304,6 @@ TEST_F(GeolocationPermissionContextTests, GeolocationEnabledDisabled) {
MockGoogleLocationSettingsHelper::SetLocationStatus(true, false);
EXPECT_EQ(0U, infobar_service()->infobar_count());
RequestGeolocationPermission(web_contents(), RequestID(0), requesting_frame);
- EXPECT_EQ(1U, infobar_service()->infobar_count());
- ConfirmInfoBarDelegate* infobar_delegate_1 =
- infobar_service()->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
- ASSERT_TRUE(infobar_delegate_1);
- base::string16 text_1 = infobar_delegate_1->GetButtonLabel(
- ConfirmInfoBarDelegate::BUTTON_OK);
- EXPECT_NE(text_0, text_1);
-
- Reload();
- MockGoogleLocationSettingsHelper::SetLocationStatus(false, false);
- EXPECT_EQ(0U, infobar_service()->infobar_count());
- RequestGeolocationPermission(web_contents(), RequestID(0), requesting_frame);
EXPECT_EQ(0U, infobar_service()->infobar_count());
}
@@ -340,13 +328,7 @@ TEST_F(GeolocationPermissionContextTests, MasterEnabledGoogleAppsDisabled) {
MockGoogleLocationSettingsHelper::SetLocationStatus(true, false);
EXPECT_EQ(0U, infobar_service()->infobar_count());
RequestGeolocationPermission(web_contents(), RequestID(0), requesting_frame);
- EXPECT_EQ(1U, infobar_service()->infobar_count());
- ConfirmInfoBarDelegate* infobar_delegate =
- infobar_service()->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
- ASSERT_TRUE(infobar_delegate);
- infobar_delegate->Accept();
- EXPECT_TRUE(
- MockGoogleLocationSettingsHelper::WasGoogleLocationSettingsCalled());
+ EXPECT_EQ(0U, infobar_service()->infobar_count());
}
#endif

Powered by Google App Engine
This is Rietveld 408576698