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

Unified Diff: chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java

Issue 10905209: Revert "Revert 155950 - Add initial Chromium TestShell support for Android" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add launcher property to apk manifest Created 8 years, 3 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/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java
diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java
new file mode 100644
index 0000000000000000000000000000000000000000..dc3ca35dacc98e0d8c4822b0f30e35f9f7bc408f
--- /dev/null
+++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.testshell;
+
+import android.app.Application;
+
+import org.chromium.base.PathUtils;
+import org.chromium.content.app.LibraryLoader;
+import org.chromium.content.browser.ResourceExtractor;
+
+/**
+ * A basic test shell {@link Application}. Handles setting up the native library and
+ * loading the right resources.
+ */
+public class ChromiumTestShellApplication extends Application {
+ private static final String TAG = ChromiumTestShellApplication.class.getCanonicalName();
+ private static final String NATIVE_LIBARY = "chromiumtestshell";
+ private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chromiumtestshell";
+ private static final String[] CHROME_MANDATORY_PAKS = {
+ "chrome.pak",
+ "en-US.pak",
+ "resources.pak",
+ "chrome_100_percent.pak",
+ };
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ ResourceExtractor.setMandatoryPaksToExtract(CHROME_MANDATORY_PAKS);
+ LibraryLoader.setLibraryToLoad(NATIVE_LIBARY);
+ PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698