Chromium Code Reviews| Index: components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java |
| diff --git a/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java b/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java |
| index a1a759a19fa8583a1dec1521148c395706f0a1c2..3c625a746a279728a8a3e3be82a228a3087e16c4 100644 |
| --- a/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java |
| +++ b/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java |
| @@ -105,7 +105,6 @@ public class CronetTestFramework { |
| String appUrl, String[] commandLine, Context context, CronetEngine.Builder builder) { |
| mCommandLine = commandLine; |
| mContext = context; |
| - prepareTestStorage(); |
| // Print out extra arguments passed in starting this activity. |
| if (commandLine != null) { |
| @@ -149,12 +148,12 @@ public class CronetTestFramework { |
| /** |
| * Prepares the path for the test storage (http cache, QUIC server info). |
| */ |
| - private void prepareTestStorage() { |
| - File storage = new File(getTestStorageDirectory(mContext)); |
| + public static void prepareTestStorage(Context context) { |
|
xunjieli
2015/12/08 20:11:57
Tests should not have access to this method. Maybe
xunjieli
2015/12/08 20:47:29
Talked to Andrei offline. I think we are gonna lea
|
| + File storage = new File(getTestStorageDirectory(context)); |
| if (storage.exists()) { |
| assertTrue(recursiveDelete(storage)); |
| } |
| - ensureTestStorageExists(mContext); |
| + ensureTestStorageExists(context); |
| } |
| /** |
| @@ -185,7 +184,7 @@ public class CronetTestFramework { |
| } |
| @SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE") |
| - private boolean recursiveDelete(File path) { |
| + private static boolean recursiveDelete(File path) { |
| if (path.isDirectory()) { |
| for (File c : path.listFiles()) { |
| if (!recursiveDelete(c)) { |