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

Unified Diff: android_webview/shell_apk/src/org/chromium/android_webview/shell/AndroidWebViewTestShellApplication.java

Issue 12317015: [android_webview] Add test shell for webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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/shell_apk/src/org/chromium/android_webview/shell/AndroidWebViewTestShellApplication.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestRunnerApplication.java b/android_webview/shell_apk/src/org/chromium/android_webview/shell/AndroidWebViewTestShellApplication.java
similarity index 54%
copy from android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestRunnerApplication.java
copy to android_webview/shell_apk/src/org/chromium/android_webview/shell/AndroidWebViewTestShellApplication.java
index 55ca4ccf22eae896bbcbb19f03895c4a6fb5f545..5069a46a2d5a0de5ed3a19219c03344662a47791 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestRunnerApplication.java
+++ b/android_webview/shell_apk/src/org/chromium/android_webview/shell/AndroidWebViewTestShellApplication.java
@@ -2,15 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.android_webview.test;
+package org.chromium.android_webview.shell;
import android.app.Application;
+import android.content.Context;
+import android.content.SharedPreferences;
import org.chromium.android_webview.AwBrowserProcess;
+import org.chromium.android_webview.AwGeolocationPermissions;
+import org.chromium.android_webview.test.AwTestResourceProvider;
import org.chromium.content.browser.ResourceExtractor;
import org.chromium.content.common.CommandLine;
-public class AndroidWebViewTestRunnerApplication extends Application {
+public class AndroidWebViewTestShellApplication extends Application {
+ private final static String PREFERENCES_NAME = "AndroidWebViewTestShellPrefs";
/** The minimum set of .pak files the test runner needs. */
private static final String[] MANDATORY_PAKS = {
@@ -21,11 +26,18 @@ public class AndroidWebViewTestRunnerApplication extends Application {
public void onCreate() {
super.onCreate();
+ SharedPreferences sharedPreferences =
+ getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE);
+
+ AwTestResourceProvider.registerResources(this);
+
CommandLine.initFromFile("/data/local/chrome-command-line");
ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAKS);
ResourceExtractor.setExtractImplicitLocaleForTesting(false);
AwBrowserProcess.loadLibrary();
- AwBrowserProcess.start(this);
+ AwBrowserProcess.start(this, sharedPreferences);
+
+ AwGeolocationPermissions.createInstance(sharedPreferences);
}
}

Powered by Google App Engine
This is Rietveld 408576698