summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:55:53 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:55:53 +0000
commit402bcb1174120908f3c6e89fa442eb8d3d34ddda (patch)
tree399a12c2a62d8fb017b47084a53f0f8546225980 /app
parente07426cf207ec7f413d21110e22a8b039212d05f (diff)
downloadchromium_src-402bcb1174120908f3c6e89fa442eb8d3d34ddda.zip
chromium_src-402bcb1174120908f3c6e89fa442eb8d3d34ddda.tar.gz
chromium_src-402bcb1174120908f3c6e89fa442eb8d3d34ddda.tar.bz2
app: Get rid of AppTestSuite class.
BUG=72317 TEST=app_unittests R=rsesek@chromium.org Review URL: http://codereview.chromium.org/7210017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/app.gyp4
-rw-r--r--app/run_all_unittests.cc6
-rw-r--r--app/test_suite.cc65
-rw-r--r--app/test_suite.h21
4 files changed, 3 insertions, 93 deletions
diff --git a/app/app.gyp b/app/app.gyp
index 2ad47cb..7e4afd5 100644
--- a/app/app.gyp
+++ b/app/app.gyp
@@ -17,9 +17,7 @@
'app_base',
'app_resources',
'../base/base.gyp:test_support_base',
- '../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
- '../ui/ui.gyp:ui_base',
],
'sources': [
'run_all_unittests.cc',
@@ -27,8 +25,6 @@
'sql/sqlite_features_unittest.cc',
'sql/statement_unittest.cc',
'sql/transaction_unittest.cc',
- 'test_suite.cc',
- 'test_suite.h',
],
'include_dirs': [
'..',
diff --git a/app/run_all_unittests.cc b/app/run_all_unittests.cc
index 63b8020..7fd6ef2 100644
--- a/app/run_all_unittests.cc
+++ b/app/run_all_unittests.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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 "app/test_suite.h"
+#include "base/test/test_suite.h"
int main(int argc, char** argv) {
- return AppTestSuite(argc, argv).Run();
+ return base::TestSuite(argc, argv).Run();
}
diff --git a/app/test_suite.cc b/app/test_suite.cc
deleted file mode 100644
index 7eaedd6..0000000
--- a/app/test_suite.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2011 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 "app/test_suite.h"
-
-#include "app/app_paths.h"
-#include "base/path_service.h"
-#include "base/mac/scoped_nsautorelease_pool.h"
-#include "build/build_config.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/ui_base_paths.h"
-
-#if defined(OS_MACOSX)
-#include "base/mac/mac_util.h"
-#endif
-
-AppTestSuite::AppTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
-
-AppTestSuite::~AppTestSuite() {}
-
-void AppTestSuite::Initialize() {
- base::mac::ScopedNSAutoreleasePool autorelease_pool;
-
- base::TestSuite::Initialize();
-
- app::RegisterPathProvider();
- ui::RegisterPathProvider();
-#if defined(OS_MACOSX)
- // Look in the framework bundle for resources.
- // TODO(port): make a resource bundle for non-app exes. What's done here
- // isn't really right because this code needs to depend on chrome_dll
- // being built. This is inappropriate in app.
- FilePath path;
- PathService::Get(base::DIR_EXE, &path);
-#if defined(GOOGLE_CHROME_BUILD)
- path = path.AppendASCII("Google Chrome Framework.framework");
-#elif defined(CHROMIUM_BUILD)
- path = path.AppendASCII("Chromium Framework.framework");
-#else
-#error Unknown branding
-#endif
- base::mac::SetOverrideAppBundlePath(path);
-#elif defined(OS_POSIX)
- FilePath pak_dir;
- PathService::Get(base::DIR_MODULE, &pak_dir);
- pak_dir = pak_dir.AppendASCII("app_unittests_strings");
- PathService::Override(ui::DIR_LOCALES, pak_dir);
- PathService::Override(ui::FILE_RESOURCES_PAK,
- pak_dir.AppendASCII("app_resources.pak"));
-#endif
-
- // Force unittests to run using en-US so if we test against string
- // output, it'll pass regardless of the system language.
- ResourceBundle::InitSharedInstance("en-US");
-}
-
-void AppTestSuite::Shutdown() {
- ResourceBundle::CleanupSharedInstance();
-
-#if defined(OS_MACOSX)
- base::mac::SetOverrideAppBundle(NULL);
-#endif
- TestSuite::Shutdown();
-}
diff --git a/app/test_suite.h b/app/test_suite.h
deleted file mode 100644
index 34e784d..0000000
--- a/app/test_suite.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2011 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 APP_TEST_SUITE_H_
-#define APP_TEST_SUITE_H_
-#pragma once
-
-#include "base/test/test_suite.h"
-
-class AppTestSuite : public base::TestSuite {
- public:
- AppTestSuite(int argc, char** argv);
- virtual ~AppTestSuite();
-
- protected:
- virtual void Initialize();
- virtual void Shutdown();
-};
-
-#endif // APP_TEST_SUITE_H_