summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-25 20:40:19 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-25 20:40:19 +0000
commitfd8c38a198841fac285bfbf6edc0fd30c0027d6f (patch)
tree6b33cef69cba50f427f57621d209be6df764a395 /ui
parent8cf18437002bf8d7396f95515eba91d262452751 (diff)
downloadchromium_src-fd8c38a198841fac285bfbf6edc0fd30c0027d6f.zip
chromium_src-fd8c38a198841fac285bfbf6edc0fd30c0027d6f.tar.gz
chromium_src-fd8c38a198841fac285bfbf6edc0fd30c0027d6f.tar.bz2
ui: Kill run_ui_unittests target.
After r246620 nobody needs or should include ui/test/test_suite.h. That allow us to concentrate it in ui/base/. We move the run_all_unittests.cc into ui/base/test and at the same time fold test_suite.* into run_all_unittests.cc and rename UITestSuite to UIBaseTestSuite. BUG=144345,299841 TEST=ui_unittests R=tony@chromium.org,ben@chromium.org TBR=ben Review URL: https://codereview.chromium.org/142793006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/test/run_all_unittests.cc (renamed from ui/test/test_suite.cc)42
-rw-r--r--ui/test/run_all_unittests.cc15
-rw-r--r--ui/test/test_suite.h31
-rw-r--r--ui/ui_unittests.gyp18
4 files changed, 34 insertions, 72 deletions
diff --git a/ui/test/test_suite.cc b/ui/base/test/run_all_unittests.cc
index c744d6e..0f94dac 100644
--- a/ui/test/test_suite.cc
+++ b/ui/base/test/run_all_unittests.cc
@@ -1,11 +1,12 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/test/test_suite.h"
-
+#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_suite.h"
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
@@ -21,12 +22,25 @@
#include "base/mac/bundle_locations.h"
#endif
-namespace ui {
-namespace test {
+namespace {
+
+class UIBaseTestSuite : public base::TestSuite {
+ public:
+ UIBaseTestSuite(int argc, char** argv);
+
+ protected:
+ // base::TestSuite:
+ virtual void Initialize() OVERRIDE;
+ virtual void Shutdown() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite);
+};
-UITestSuite::UITestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
+UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv)
+ : base::TestSuite(argc, argv) {}
-void UITestSuite::Initialize() {
+void UIBaseTestSuite::Initialize() {
base::TestSuite::Initialize();
#if defined(OS_ANDROID)
@@ -61,7 +75,7 @@ void UITestSuite::Initialize() {
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
}
-void UITestSuite::Shutdown() {
+void UIBaseTestSuite::Shutdown() {
ui::ResourceBundle::CleanupSharedInstance();
#if defined(OS_MACOSX) && !defined(OS_IOS)
@@ -70,5 +84,13 @@ void UITestSuite::Shutdown() {
base::TestSuite::Shutdown();
}
-} // namespace test
-} // namespace ui
+} // namespace
+
+int main(int argc, char** argv) {
+ UIBaseTestSuite test_suite(argc, argv);
+
+ return base::LaunchUnitTests(argc,
+ argv,
+ base::Bind(&UIBaseTestSuite::Run,
+ base::Unretained(&test_suite)));
+}
diff --git a/ui/test/run_all_unittests.cc b/ui/test/run_all_unittests.cc
deleted file mode 100644
index bd548d6..0000000
--- a/ui/test/run_all_unittests.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/bind.h"
-#include "base/test/launcher/unit_test_launcher.h"
-#include "ui/test/test_suite.h"
-
-int main(int argc, char** argv) {
- ui::test::UITestSuite test_suite(argc, argv);
-
- return base::LaunchUnitTests(
- argc, argv, base::Bind(&ui::test::UITestSuite::Run,
- base::Unretained(&test_suite)));
-}
diff --git a/ui/test/test_suite.h b/ui/test/test_suite.h
deleted file mode 100644
index a38ec77..0000000
--- a/ui/test/test_suite.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_TEST_TEST_SUITE_H_
-#define UI_TEST_TEST_SUITE_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/test/test_suite.h"
-
-namespace ui {
-namespace test {
-
-class UITestSuite : public base::TestSuite {
- public:
- UITestSuite(int argc, char** argv);
-
- protected:
- // Overridden from base::TestSuite:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UITestSuite);
-};
-
-} // namespace test
-} // namespace ui
-
-#endif // UI_TEST_TEST_SUITE_H_
diff --git a/ui/ui_unittests.gyp b/ui/ui_unittests.gyp
index 0cf204a..552d8f9 100644
--- a/ui/ui_unittests.gyp
+++ b/ui/ui_unittests.gyp
@@ -61,26 +61,12 @@
],
},
{
- 'target_name': 'run_ui_unittests',
- 'type': 'static_library',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/base.gyp:test_support_base',
- '../chrome/chrome_resources.gyp:packed_resources',
- 'ui.gyp:ui',
- ],
- 'sources': [
- 'test/test_suite.cc',
- 'test/test_suite.h',
- 'test/run_all_unittests.cc',
- ],
- },
- {
'target_name': 'ui_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
+ '../chrome/chrome_resources.gyp:packed_resources',
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
@@ -93,7 +79,6 @@
'gfx/gfx.gyp:gfx_geometry_unittests',
'gfx/gfx.gyp:gfx_test_support',
'resources/ui_resources.gyp:ui_resources',
- 'run_ui_unittests',
'shell_dialogs/shell_dialogs.gyp:shell_dialogs',
'ui.gyp:ui',
'ui_test_support',
@@ -110,6 +95,7 @@
'base/resource/data_pack_literal.cc',
'base/resource/data_pack_unittest.cc',
'base/resource/resource_bundle_unittest.cc',
+ 'base/test/run_all_unittests.cc',
'gfx/animation/animation_container_unittest.cc',
'gfx/animation/animation_unittest.cc',
'gfx/animation/multi_animation_unittest.cc',