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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java

Issue 2729493004: Update Android site settings to display BLOCK for embargoed permissions. (Closed)
Patch Set: Fix PreferencesTest Created 3 years, 10 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/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java
index ab4d413d0ef3717dc5737b65af4fe6dfa55809bb..99dcd0f9a590aaf29170cc4369498e5f2b1fc9a0 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java
@@ -94,16 +94,9 @@ public class GeolocationHeaderTest extends ChromeActivityTestCaseBase<ChromeActi
setMockLocation(20.3, 155.8, System.currentTimeMillis());
// X-Geo shouldn't be sent when location is disallowed for https origin.
- // If https origin doesn't have a location setting, fall back to value for http origin.
- checkHeaderWithPermissions(ContentSetting.ALLOW, ContentSetting.ALLOW, false);
- checkHeaderWithPermissions(ContentSetting.ALLOW, ContentSetting.DEFAULT, false);
- checkHeaderWithPermissions(ContentSetting.ALLOW, ContentSetting.BLOCK, false);
- checkHeaderWithPermissions(ContentSetting.DEFAULT, ContentSetting.ALLOW, false);
- checkHeaderWithPermissions(ContentSetting.DEFAULT, ContentSetting.DEFAULT, false);
- checkHeaderWithPermissions(ContentSetting.DEFAULT, ContentSetting.BLOCK, true);
- checkHeaderWithPermissions(ContentSetting.BLOCK, ContentSetting.ALLOW, true);
- checkHeaderWithPermissions(ContentSetting.BLOCK, ContentSetting.DEFAULT, true);
- checkHeaderWithPermissions(ContentSetting.BLOCK, ContentSetting.BLOCK, true);
+ checkHeaderWithPermissions(ContentSetting.ALLOW, false);
+ checkHeaderWithPermissions(ContentSetting.DEFAULT, false);
+ checkHeaderWithPermissions(ContentSetting.BLOCK, true);
}
@SmallTest
@@ -137,16 +130,14 @@ public class GeolocationHeaderTest extends ChromeActivityTestCaseBase<ChromeActi
assertNullHeader(SEARCH_URL_1, false);
}
- private void checkHeaderWithPermissions(final ContentSetting httpsPermission,
- final ContentSetting httpPermission, final boolean shouldBeNull) {
+ private void checkHeaderWithPermissions(
+ final ContentSetting httpsPermission, final boolean shouldBeNull) {
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
GeolocationInfo infoHttps =
new GeolocationInfo("https://www.google.de", null, false);
- GeolocationInfo infoHttp = new GeolocationInfo("http://www.google.de", null, false);
infoHttps.setContentSetting(httpsPermission);
- infoHttp.setContentSetting(httpPermission);
String header = GeolocationHeader.getGeoHeader(
"https://www.google.de/search?q=kartoffelsalat",
getActivity().getActivityTab());

Powered by Google App Engine
This is Rietveld 408576698