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

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

Issue 1186513002: Revert of [Android] Refactor browser test execution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 0f6628a648c7e71395a4a4207529dc7cb952062a..ac2ddeef84a6dbca5b71775ae60e536965f2757c 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
@@ -6,16 +6,10 @@
import android.os.Bundle;
-import org.chromium.base.Log;
-
-import java.io.File;
-
/**
* An {@link android.app.Activity} for running native browser tests.
*/
public abstract class NativeBrowserTestActivity extends NativeTestActivity {
-
- private static final String TAG = "cr.native_test";
private static final String BROWSER_TESTS_FLAGS[] = {
// content::kSingleProcessTestsFlag
@@ -38,43 +32,9 @@
@Override
public void onStart() {
- deletePrivateDataDirectory();
initializeBrowserProcess();
super.onStart();
}
-
- /** Deletes a file or directory along with any of its children.
- *
- * Note that, like File.delete(), this returns false if the file or directory couldn't be
- * fully deleted. This means that, in the directory case, some files may be deleted even if
- * the entire directory couldn't be.
- *
- * @param file The file or directory to delete.
- * @return Whether or not the file or directory was deleted.
- */
- private static boolean deleteRecursive(File file) {
- if (file == null) return true;
-
- File[] children = file.listFiles();
- if (children != null) {
- for (File child : children) {
- if (!deleteRecursive(child)) {
- return false;
- }
- }
- }
- return file.delete();
- }
-
- private void deletePrivateDataDirectory() {
- File privateDataDirectory = getPrivateDataDirectory();
- if (!deleteRecursive(privateDataDirectory)) {
- Log.e(TAG, "Failed to remove %s", privateDataDirectory.getAbsolutePath());
- }
- }
-
- /** Returns the test suite's private data directory. */
- protected abstract File getPrivateDataDirectory();
/** Initializes the browser process.
*
@@ -82,4 +42,5 @@
* among other things.
*/
protected abstract void initializeBrowserProcess();
+
}
« no previous file with comments | « testing/android/native_test.gyp ('k') | testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698