Index: webkit/support/platform_support_android.cc |
diff --git a/webkit/support/platform_support_android.cc b/webkit/support/platform_support_android.cc |
index 7298b8176aa513e36b2588b185363a8079fffa6c..458cc72231e8161d02010941df546e5c99f23cea 100644 |
--- a/webkit/support/platform_support_android.cc |
+++ b/webkit/support/platform_support_android.cc |
@@ -39,8 +39,12 @@ void BeforeInitialize(bool unit_test_mode) { |
// loading and complaining the non-exsistent /etc/xml/catalog file. |
setenv("XML_CATALOG_FILES", "", 0); |
- JNIEnv* env = base::android::AttachCurrentThread(); |
- net::android::RegisterNetworkLibrary(env); |
+ // For now TestWebKitAPI and webkit_unit_tests are standalone executables |
+ // which don't have Java capabilities. Init Java for only DumpRenderTree. |
+ if (!unit_test_mode) { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ net::android::RegisterNetworkLibrary(env); |
+ } |
} |
void AfterInitialize(bool unit_test_mode) { |