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

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

Issue 2803853006: WebView: prefer ContentUrlConstants over literals (Closed)
Patch Set: Revert changes to system webview shell Created 3 years, 8 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: 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 3707f5f7a9ddb33f4b82a86ac90773d49bddd265..c636700c261b83dcba72fd045028456daa62ed18 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
@@ -14,6 +14,7 @@ import org.chromium.android_webview.AwSettings;
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.RetryOnFailure;
+import org.chromium.content_public.common.ContentUrlConstants;
import org.chromium.device.geolocation.LocationProviderFactory;
import org.chromium.device.geolocation.MockLocationProvider;
@@ -148,7 +149,8 @@ public class GeolocationTest extends AwTestBase {
public void testGetPosition() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);
@@ -177,7 +179,8 @@ public class GeolocationTest extends AwTestBase {
public void testWatchPosition() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -195,7 +198,8 @@ public class GeolocationTest extends AwTestBase {
initAwContents(new GrantPermisionAwContentClient());
// Start a watch going.
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -254,7 +258,8 @@ public class GeolocationTest extends AwTestBase {
// Start a watch going.
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_watchPosition();", null);
@@ -291,7 +296,8 @@ public class GeolocationTest extends AwTestBase {
});
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
getInstrumentation().runOnMainSync(new Runnable() {
@Override
@@ -309,7 +315,8 @@ public class GeolocationTest extends AwTestBase {
public void testDenyAccessByDefault() throws Throwable {
initAwContents(new DefaultPermisionAwContentClient());
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "https://google.com/", "about:blank");
+ "text/html", false, "https://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);
@@ -330,7 +337,8 @@ public class GeolocationTest extends AwTestBase {
mOverridenFactory = new GeolocationOnInsecureOriginsTestDependencyFactory(false);
initAwContents(new GrantPermisionAwContentClient());
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "http://google.com/", "about:blank");
+ "text/html", false, "http://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);
@@ -349,7 +357,8 @@ public class GeolocationTest extends AwTestBase {
public void testAllowOnInsecureOriginsByDefault() throws Throwable {
initAwContents(new GrantPermisionAwContentClient());
loadDataWithBaseUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), RAW_HTML,
- "text/html", false, "http://google.com/", "about:blank");
+ "text/html", false, "http://google.com/",
+ ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
mAwContents.evaluateJavaScriptForTests("initiate_getCurrentPosition();", null);

Powered by Google App Engine
This is Rietveld 408576698