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

Unified Diff: content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java

Issue 12047068: Add apk for running content_browsertests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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: content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java
diff --git a/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java b/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..6c7f09ae26307d5ce793f03b55a132eb871848fd
--- /dev/null
+++ b/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.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.content_browsertests_apk;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+
+import org.chromium.content.app.LibraryLoader;
+import org.chromium.content.common.ProcessInitException;
+import org.chromium.ui.gfx.ActivityNativeWindow;
+import org.chromium.content_shell.ShellManager;
+
+public class ContentBrowserTestsActivity extends Activity {
+ private static final String TAG = "ChromeBrowserTestsActivity";
+
+ private ShellManager mShellManager;
+ private ActivityNativeWindow mActivityNativeWindow;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ try {
+ LibraryLoader.ensureInitialized();
+ } catch (ProcessInitException e) {
+ Log.i(TAG, "Cannot load content_browsertests:" + e);
+ }
+
+ setContentView(R.layout.test_activity);
+ mShellManager = (ShellManager) findViewById(R.id.shell_container);
+ mActivityNativeWindow = new ActivityNativeWindow(this);
+ mShellManager.setWindow(mActivityNativeWindow);
+
+ runTests();
+ }
+
+ private void runTests() {
+ nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext());
+ }
+
+ private native void nativeRunTests(String filesDir, Context appContext);
+}

Powered by Google App Engine
This is Rietveld 408576698