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

Unified Diff: testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java

Issue 1975153003: Enable NativeActivity based Android tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java b/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java
index cc056c455adb6c2b60c7914a8e6b75c7584993fe..92fc469391dfb070ef4d3769cd65184336648d0d 100644
--- a/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java
+++ b/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java
@@ -4,6 +4,7 @@
package org.chromium.native_test;
+import android.app.Activity;
import android.os.Bundle;
import org.chromium.base.Log;
@@ -13,8 +14,7 @@ import java.io.File;
/**
* An {@link android.app.Activity} for running native browser tests.
*/
-public abstract class NativeBrowserTestActivity extends NativeTestActivity {
-
+public abstract class NativeBrowserTestActivity extends Activity {
private static final String TAG = "cr_NativeTest";
private static final String BROWSER_TESTS_FLAGS[] = {
@@ -25,9 +25,13 @@ public abstract class NativeBrowserTestActivity extends NativeTestActivity {
"--use-fake-device-for-media-stream"
};
+ private NativeTest mTest = new NativeTest();
+
@Override
public void onCreate(Bundle savedInstanceState) {
+ mTest.preCreate(this);
super.onCreate(savedInstanceState);
+ mTest.postCreate(this);
for (String flag : BROWSER_TESTS_FLAGS) {
appendCommandLineFlags(flag);
}
@@ -38,6 +42,11 @@ public abstract class NativeBrowserTestActivity extends NativeTestActivity {
deletePrivateDataDirectory();
initializeBrowserProcess();
super.onStart();
+ mTest.postStart(this, false);
+ }
+
+ public void appendCommandLineFlags(String flags) {
+ mTest.appendCommandLineFlags(flags);
}
/** Deletes a file or directory along with any of its children.

Powered by Google App Engine
This is Rietveld 408576698