More stuff -> ash
http://crbug.com/108457
TEST=none
TBR=sky
Review URL: http://codereview.chromium.org/9033006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115741 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/test/test_suite.cc b/ash/test/test_suite.cc
new file mode 100644
index 0000000..eb22a6b
--- /dev/null
+++ b/ash/test/test_suite.cc
@@ -0,0 +1,52 @@
+// 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 "ash/test/test_suite.h"
+
+#include "base/file_path.h"
+#include "base/path_service.h"
+#include "build/build_config.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_paths.h"
+#include "ui/gfx/compositor/test/compositor_test_support.h"
+#include "ui/gfx/gfx_paths.h"
+
+#if defined(USE_WEBKIT_COMPOSITOR)
+#include "ui/gfx/compositor/compositor_setup.h"
+#else
+#include "ui/gfx/test/gfx_test_utils.h"
+#endif
+
+namespace aura_shell {
+namespace test {
+
+AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv)
+ : TestSuite(argc, argv) {}
+
+void AuraShellTestSuite::Initialize() {
+ base::TestSuite::Initialize();
+
+ gfx::RegisterPathProvider();
+ ui::RegisterPathProvider();
+
+ // Force unittests to run using en-US so if we test against string
+ // output, it'll pass regardless of the system language.
+ ui::ResourceBundle::InitSharedInstance("en-US");
+ ui::CompositorTestSupport::Initialize();
+#if defined(USE_WEBKIT_COMPOSITOR)
+ ui::SetupTestCompositor();
+#else
+ ui::gfx_test_utils::SetupTestCompositor();
+#endif
+}
+
+void AuraShellTestSuite::Shutdown() {
+ ui::CompositorTestSupport::Terminate();
+ ui::ResourceBundle::CleanupSharedInstance();
+
+ base::TestSuite::Shutdown();
+}
+
+} // namespace test
+} // namespace aura_shell