Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/support/platform_support.h" | 5 #include "webkit/support/platform_support.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py. | 26 // WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py. |
| 27 // TODO(wangxianzhu): Allow running DRT on non-rooted device by putting | 27 // TODO(wangxianzhu): Allow running DRT on non-rooted device by putting |
| 28 // the tools and resources into the apk or under /data/local/tmp. | 28 // the tools and resources into the apk or under /data/local/tmp. |
| 29 const char kDumpRenderTreeDir[] = "/data/drt"; | 29 const char kDumpRenderTreeDir[] = "/data/drt"; |
| 30 | 30 |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace webkit_support { | 33 namespace webkit_support { |
| 34 | 34 |
| 35 void BeforeInitialize(bool unit_test_mode) { | 35 void BeforeInitialize(bool unit_test_mode) { |
| 36 InitAndroidTestPaths(); | 36 base::InitAndroidTestPaths(); |
|
Xianzhu
2012/06/08 19:35:37
Nit: Extra indent
nilesh
2012/06/08 19:39:12
Done.
| |
| 37 | 37 |
| 38 // Set XML_CATALOG_FILES environment variable to blank to prevent libxml from | 38 // Set XML_CATALOG_FILES environment variable to blank to prevent libxml from |
| 39 // loading and complaining the non-exsistent /etc/xml/catalog file. | 39 // loading and complaining the non-exsistent /etc/xml/catalog file. |
| 40 setenv("XML_CATALOG_FILES", "", 0); | 40 setenv("XML_CATALOG_FILES", "", 0); |
| 41 | 41 |
| 42 // For now TestWebKitAPI and webkit_unit_tests are standalone executables | 42 // For now TestWebKitAPI and webkit_unit_tests are standalone executables |
| 43 // which don't have Java capabilities. Init Java for only DumpRenderTree. | 43 // which don't have Java capabilities. Init Java for only DumpRenderTree. |
| 44 if (!unit_test_mode) { | 44 if (!unit_test_mode) { |
| 45 JNIEnv* env = base::android::AttachCurrentThread(); | 45 JNIEnv* env = base::android::AttachCurrentThread(); |
| 46 net::android::RegisterNetworkLibrary(env); | 46 net::android::RegisterNetworkLibrary(env); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 if (!success) | 105 if (!success) |
| 106 LOG(FATAL) << "Failed reading: " << path.value(); | 106 LOG(FATAL) << "Failed reading: " << path.value(); |
| 107 } | 107 } |
| 108 return resize_corner_data; | 108 return resize_corner_data; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 return ResourceBundle::GetSharedInstance().GetRawDataResource( | 112 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 113 resource_id, scale_factor); | 113 resource_id, scale_factor); |
| 114 } | 114 } |
| OLD | NEW |