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

Side by Side 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: Addressed comments 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.content_browsertests_apk;
6
7 import android.app.Activity;
8 import android.content.Context;
9 import android.os.Bundle;
10 import android.util.Log;
11
12 import org.chromium.content.app.LibraryLoader;
13 import org.chromium.content.common.ProcessInitException;
14 import org.chromium.ui.gfx.ActivityNativeWindow;
15 import org.chromium.content_shell.ShellManager;
16
17 public class ContentBrowserTestsActivity extends Activity {
18 private static final String TAG = "ChromeBrowserTestsActivity";
19
20 private ShellManager mShellManager;
21 private ActivityNativeWindow mActivityNativeWindow;
22
23 @Override
24 public void onCreate(Bundle savedInstanceState) {
25 super.onCreate(savedInstanceState);
26
27 try {
28 LibraryLoader.ensureInitialized();
29 } catch (ProcessInitException e) {
30 Log.i(TAG, "Cannot load content_browsertests:" + e);
31 }
32
33 setContentView(R.layout.test_activity);
34 mShellManager = (ShellManager) findViewById(R.id.shell_container);
35 mActivityNativeWindow = new ActivityNativeWindow(this);
36 mShellManager.setWindow(mActivityNativeWindow);
37
38 runTests();
39 }
40
41 private void runTests() {
42 nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext()) ;
43 }
44
45 private native void nativeRunTests(String filesDir, Context appContext);
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698