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 |
index d10b719cfe885073e400fccabbad4c069311473e..aaadab1c662ca29d383095d0082b642f21424330 100644 |
--- 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 |
@@ -5,29 +5,19 @@ |
package org.chromium.content_browsertests_apk; |
import android.os.Bundle; |
-import android.view.Window; |
-import android.view.WindowManager; |
import org.chromium.base.Log; |
-import org.chromium.base.annotations.SuppressFBWarnings; |
-import org.chromium.base.library_loader.LibraryLoader; |
-import org.chromium.base.library_loader.LibraryProcessType; |
-import org.chromium.base.library_loader.ProcessInitException; |
-import org.chromium.content.browser.BrowserStartupController; |
-import org.chromium.content_shell.ShellManager; |
-import org.chromium.native_test.NativeBrowserTestActivity; |
-import org.chromium.ui.base.ActivityWindowAndroid; |
-import org.chromium.ui.base.WindowAndroid; |
+import org.chromium.base.PathUtils; |
+import org.chromium.content_shell.browsertests.ContentShellBrowserTestActivity; |
+ |
+import java.io.File; |
/** |
* Android activity for running content browser tests |
*/ |
-public class ContentBrowserTestsActivity extends NativeBrowserTestActivity { |
+public class ContentBrowserTestsActivity extends ContentShellBrowserTestActivity { |
private static final String TAG = Log.makeTag("native_test"); |
- private ShellManager mShellManager; |
- private WindowAndroid mWindowAndroid; |
- |
@Override |
public void onCreate(Bundle savedInstanceState) { |
super.onCreate(savedInstanceState); |
@@ -36,25 +26,19 @@ public class ContentBrowserTestsActivity extends NativeBrowserTestActivity { |
} |
@Override |
- @SuppressFBWarnings("DM_EXIT") |
- protected void initializeBrowserProcess() { |
- try { |
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(); |
- } catch (ProcessInitException e) { |
- Log.e(TAG, "Cannot load content_browsertests.", e); |
- System.exit(-1); |
- } |
- BrowserStartupController.get(getApplicationContext(), LibraryProcessType.PROCESS_BROWSER) |
- .initChromiumBrowserProcessForTests(); |
- |
- setContentView(R.layout.test_activity); |
- mShellManager = (ShellManager) findViewById(R.id.shell_container); |
- mWindowAndroid = new ActivityWindowAndroid(this); |
- mShellManager.setWindow(mWindowAndroid, false); |
- |
- Window wind = this.getWindow(); |
- wind.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); |
- wind.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); |
- wind.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); |
+ protected File getPrivateDataDirectory() { |
+ return new File(PathUtils.getExternalStorageDirectory(), |
+ ContentBrowserTestsApplication.PRIVATE_DATA_DIRECTORY_SUFFIX); |
+ } |
+ |
+ @Override |
+ protected int getTestActivityViewId() { |
+ return R.layout.test_activity; |
} |
+ |
+ @Override |
+ protected int getShellManagerViewId() { |
+ return R.id.shell_container; |
+ } |
+ |
} |