Index: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java |
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java |
index 195eafcb1a7abfc2279b281e5744cb784d27c68e..ce07d6bdca5eb22145ced74721f3991f8d7bd926 100644 |
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java |
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java |
@@ -960,35 +960,4 @@ |
// Verifies that CronetEngine.Builder config from testCronetEngineBuilderConfig() is properly |
// translated to a native UrlRequestContextConfig. |
private static native void nativeVerifyUrlRequestContextConfig(long config, String storagePath); |
- |
- private static class TestBadLibraryLoader extends CronetEngine.Builder.LibraryLoader { |
- private boolean mWasCalled = false; |
- |
- public void loadLibrary(String libName) { |
- // Report that this method was called, but don't load the library |
- mWasCalled = true; |
- } |
- |
- boolean wasCalled() { |
- return mWasCalled; |
- } |
- } |
- |
- @SmallTest |
- @Feature({"Cronet"}) |
- public void testSkipLibraryLoading() throws Exception { |
- CronetEngine.Builder builder = new CronetEngine.Builder(getContext()); |
- TestBadLibraryLoader loader = new TestBadLibraryLoader(); |
- builder.setLibraryLoader(loader).setLibraryName("cronet_tests"); |
- try { |
- // ensureInitialized() calls native code to check the version right after library load |
- // and will error with the message below if library loading was skipped |
- CronetLibraryLoader.ensureInitialized(getContext(), builder); |
- fail("Native library should not be loaded"); |
- } catch (UnsatisfiedLinkError e) { |
- assertTrue(e.getMessage().contains( |
- "No implementation found for java.lang.String org.chromium.net")); |
- assertTrue(loader.wasCalled()); |
- } |
- } |
} |