Index: ui/android/run_all_unittests.cc |
diff --git a/ui/gfx/test/run_all_unittests.cc b/ui/android/run_all_unittests.cc |
similarity index 68% |
copy from ui/gfx/test/run_all_unittests.cc |
copy to ui/android/run_all_unittests.cc |
index 1483929c1854d46bf0dc3429dce2a1bc28d38654..f15eb51ea02e34032aa84db8cbdb96a07614b9ef 100644 |
--- a/ui/gfx/test/run_all_unittests.cc |
+++ b/ui/android/run_all_unittests.cc |
@@ -2,6 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/android/jni_android.h" |
#include "base/bind.h" |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
@@ -9,35 +10,23 @@ |
#include "base/test/launcher/unit_test_launcher.h" |
#include "base/test/test_suite.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "ui/android/ui_android_jni_registrar.h" |
#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 |
- |
-#if defined(OS_MACOSX) && !defined(OS_IOS) |
-#include "base/test/mock_chrome_application_mac.h" |
-#endif |
namespace { |
-class GfxTestSuite : public base::TestSuite { |
+class UIAndroidTestSuite : public base::TestSuite { |
public: |
- GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
+ UIAndroidTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
protected: |
void Initialize() override { |
base::TestSuite::Initialize(); |
-#if defined(OS_ANDROID) |
gfx::android::RegisterJni(base::android::AttachCurrentThread()); |
-#endif |
- |
-#if defined(OS_MACOSX) && !defined(OS_IOS) |
- mock_cr_app::RegisterMockCrApp(); |
-#endif |
+ ui::RegisterUIAndroidJni(base::android::AttachCurrentThread()); |
ui::RegisterPathProvider(); |
@@ -52,16 +41,15 @@ class GfxTestSuite : public base::TestSuite { |
} |
private: |
- DISALLOW_COPY_AND_ASSIGN(GfxTestSuite); |
+ DISALLOW_COPY_AND_ASSIGN(UIAndroidTestSuite); |
}; |
} // namespace |
int main(int argc, char** argv) { |
- GfxTestSuite test_suite(argc, argv); |
+ UIAndroidTestSuite test_suite(argc, argv); |
return base::LaunchUnitTests( |
- argc, |
- argv, |
- base::Bind(&GfxTestSuite::Run, base::Unretained(&test_suite))); |
+ argc, argv, |
+ base::Bind(&UIAndroidTestSuite::Run, base::Unretained(&test_suite))); |
} |