| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/test/launcher/unit_test_launcher.h" | 6 #include "base/test/launcher/unit_test_launcher.h" |
| 7 #include "base/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "mojo/edk/embedder/embedder.h" | 9 #include "mojo/edk/embedder/embedder.h" |
| 10 | 10 |
| 11 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
| 12 #include "base/android/base_jni_registrar.h" | 12 #include "base/android/base_jni_registrar.h" |
| 13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
| 14 #include "blimp/client/public/android/blimp_jni_registrar.h" | 14 #include "blimp/client/public/android/blimp_jni_registrar.h" |
| 15 #include "net/android/net_jni_registrar.h" | 15 #include "net/android/net_jni_registrar.h" |
| 16 #include "ui/android/ui_android_jni_registrar.h" |
| 16 #include "ui/gfx/android/gfx_jni_registrar.h" | 17 #include "ui/gfx/android/gfx_jni_registrar.h" |
| 17 #endif | 18 #endif |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 class BlimpTestSuite : public base::TestSuite { | 22 class BlimpTestSuite : public base::TestSuite { |
| 22 public: | 23 public: |
| 23 BlimpTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} | 24 BlimpTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
| 24 | 25 |
| 25 protected: | 26 protected: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 41 } | 42 } |
| 42 | 43 |
| 43 if (!net::android::RegisterJni(env)) { | 44 if (!net::android::RegisterJni(env)) { |
| 44 return false; | 45 return false; |
| 45 } | 46 } |
| 46 | 47 |
| 47 if (!gfx::android::RegisterJni(env)) { | 48 if (!gfx::android::RegisterJni(env)) { |
| 48 return false; | 49 return false; |
| 49 } | 50 } |
| 50 | 51 |
| 52 if (!ui::RegisterUIAndroidJni(env)) { |
| 53 return false; |
| 54 } |
| 55 |
| 51 if (!blimp::client::RegisterBlimpJni(env)) { | 56 if (!blimp::client::RegisterBlimpJni(env)) { |
| 52 return false; | 57 return false; |
| 53 } | 58 } |
| 54 | 59 |
| 55 return true; | 60 return true; |
| 56 } | 61 } |
| 57 #endif | 62 #endif |
| 58 | 63 |
| 59 DISALLOW_COPY_AND_ASSIGN(BlimpTestSuite); | 64 DISALLOW_COPY_AND_ASSIGN(BlimpTestSuite); |
| 60 }; | 65 }; |
| 61 | 66 |
| 62 } // namespace | 67 } // namespace |
| 63 | 68 |
| 64 int main(int argc, char** argv) { | 69 int main(int argc, char** argv) { |
| 65 mojo::edk::Init(); | 70 mojo::edk::Init(); |
| 66 BlimpTestSuite test_suite(argc, argv); | 71 BlimpTestSuite test_suite(argc, argv); |
| 67 return base::LaunchUnitTests( | 72 return base::LaunchUnitTests( |
| 68 argc, argv, | 73 argc, argv, |
| 69 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); | 74 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
| 70 } | 75 } |
| OLD | NEW |