Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: ui/android/run_all_unittests.cc

Issue 755643004: Replace SystemUIResourceManager with ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang build failure Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/resources/ui_resource_provider.cc ('k') | ui/android/ui_android.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
}
« no previous file with comments | « ui/android/resources/ui_resource_provider.cc ('k') | ui/android/ui_android.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698