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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java

Issue 1485973002: Removal of geolocation APIs on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix WebView tests Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java
index 3fddb029577f810eb3cb6673149bd2e5da40dfbc..efc827f29567e556669eaa4209a5830dc1e60bbe 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java
@@ -123,8 +123,8 @@ public class GeolocationTest extends AwTestBase {
@Feature({"AndroidWebView"})
public void testGetPosition() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);
@@ -151,8 +151,8 @@ public class GeolocationTest extends AwTestBase {
@Feature({"AndroidWebView"})
public void testWatchPosition() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -169,8 +169,8 @@ public class GeolocationTest extends AwTestBase {
public void testPauseGeolocationOnPause() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
// Start a watch going.
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -228,8 +228,8 @@ public class GeolocationTest extends AwTestBase {
});
// Start a watch going.
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -265,8 +265,8 @@ public class GeolocationTest extends AwTestBase {
}
});
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
getInstrumentation().runOnMainSync(new Runnable() {
@Override
@@ -282,8 +282,8 @@ public class GeolocationTest extends AwTestBase {
@SmallTest
public void testDenyAccessByDefault() throws Throwable {
initAwContents(new DefaultPermisionAwContentClient());
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
- RAW_HTML, "text/html", false);
+ loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
+ "text/html", false, "https://google.com/", "about:blank");
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698