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

Unified Diff: chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.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/ChromiumTestShellActivity.java
diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..182de9b539bd63d9cd0dfee1d72ae04fb9a0e80a
--- /dev/null
+++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java
@@ -0,0 +1,46 @@
+// 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.Activity;
+import android.os.Bundle;
+import android.util.Log;
+
+import org.chromium.content.app.LibraryLoader;
+import org.chromium.content.browser.ContentView;
+import org.chromium.content.common.CommandLine;
+
+/**
+ * The {@link Activity} component of a basic test shell to test Chrome features.
+ */
+public class ChromiumTestShellActivity extends Activity {
+ private static final String TAG = ChromiumTestShellActivity.class.getCanonicalName();
+ private static final String COMMAND_LINE_FILE =
+ "/data/local/tmp/chrome-test-shell-command-line";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ if (!CommandLine.isInitialized()) CommandLine.initFromFile(COMMAND_LINE_FILE);
+ waitForDebuggerIfNeeded();
+
+ LibraryLoader.loadAndInitSync();
+ initializeContentViewResources();
+
+ ContentView.initChromiumBrowserProcess(this, ContentView.MAX_RENDERERS_AUTOMATIC);
+ }
+
+ private void waitForDebuggerIfNeeded() {
+ if (CommandLine.getInstance().hasSwitch(CommandLine.WAIT_FOR_JAVA_DEBUGGER)) {
+ Log.e(TAG, "Waiting for Java debugger to connect...");
+ android.os.Debug.waitForDebugger();
+ Log.e(TAG, "Java debugger connected. Resuming execution.");
+ }
+ }
+
+ private void initializeContentViewResources() {
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698