Index: chrome/browser/geolocation/geolocation_browsertest.cc |
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc |
index 2062dfef2565feedc4887b45f752d53a1313323f..2377599a70e062d063b6cc08423a30441a723949 100644 |
--- a/chrome/browser/geolocation/geolocation_browsertest.cc |
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc |
@@ -461,6 +461,21 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, NoInfobarForOffTheRecord) { |
CheckGeoposition(fake_latitude_, fake_longitude_); |
} |
+IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, NoLeakFromOffTheRecord) { |
+ // First, check infobar will be created for incognito profile. |
+ ASSERT_TRUE(Initialize(INITIALIZATION_OFFTHERECORD)); |
+ AddGeolocationWatch(true); |
+ // Response won't be persisted. |
+ SetInfobarResponse(current_url_, true); |
+ CheckGeoposition(fake_latitude_, fake_longitude_); |
+ // Disables further prompts from this tab. |
+ CheckStringValueFromJavascript("0", "geoSetMaxNavigateCount(0)"); |
+ // Go to the regular profile, infobar will be created. |
+ ASSERT_TRUE(Initialize(INITIALIZATION_NONE)); |
+ AddGeolocationWatch(true); |
+ SetInfobarResponse(current_url_, false); |
markusheintz_
2013/04/04 11:27:02
Should we also check here that the location can't
vasilii
2013/04/04 12:11:26
Done.
|
+} |
+ |
// crbug.com/176291 |
IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, |
DISABLED_IFramesWithFreshPosition) { |