Commit baf304cf authored by pauljensen's avatar pauljensen Committed by Commit bot

[Cronet] Copy certificates before using in tests

If you try and run some tests by themselves they may fail because
the certificate files have not been extracted from the APK
assets.  Make sure the files are extracted before use.
Without this change some tests only pass because prior tests
have already extracted the files.  Tests should not be dependent
on other tests.

BUG=629299
R=xunjieli
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2573483003
Cr-Commit-Position: refs/heads/master@{#437918}
parent 588d1728
...@@ -7,6 +7,7 @@ package org.chromium.net; ...@@ -7,6 +7,7 @@ package org.chromium.net;
import android.content.Context; import android.content.Context;
import android.os.ConditionVariable; import android.os.ConditionVariable;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log; import org.chromium.base.Log;
import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.JNINamespace;
...@@ -73,6 +74,7 @@ public final class QuicTestServer { ...@@ -73,6 +74,7 @@ public final class QuicTestServer {
} }
public static long createMockCertVerifier() { public static long createMockCertVerifier() {
TestFilesInstaller.installIfNeeded(ContextUtils.getApplicationContext());
return MockCertVerifier.createMockCertVerifier(CERTS_USED, true); return MockCertVerifier.createMockCertVerifier(CERTS_USED, true);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment