Index: ui/gfx/test/run_all_unittests.cc |
diff --git a/ui/gfx/test/run_all_unittests.cc b/ui/gfx/test/run_all_unittests.cc |
index 3ac61bcd7ccefbd005cec9f5acc2f5ececefb28d..14ceef9ca4a5f79f9fd7806798683aa1037d3573 100644 |
--- a/ui/gfx/test/run_all_unittests.cc |
+++ b/ui/gfx/test/run_all_unittests.cc |
@@ -12,6 +12,11 @@ |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/base/ui_base_paths.h" |
+#if defined(OS_ANDROID) |
+#include "base/android/jni_android.h" |
+#include "ui/gfx/android/gfx_jni_registrar.h" |
+#endif |
+ |
namespace { |
class GfxTestSuite : public base::TestSuite { |
@@ -21,6 +26,11 @@ class GfxTestSuite : public base::TestSuite { |
protected: |
virtual void Initialize() OVERRIDE { |
base::TestSuite::Initialize(); |
+ |
+#if defined(OS_ANDROID) |
+ gfx::android::RegisterJni(base::android::AttachCurrentThread()); |
+#endif |
+ |
ui::RegisterPathProvider(); |
base::FilePath ui_test_pak_path; |