blob: a0ac59dccf3d7655d719112cd137ea6e7ef362aa [file] [log] [blame]
[email protected]e319c7e2014-03-14 19:56:141// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/basictypes.h"
6#include "base/bind.h"
7#include "base/compiler_specific.h"
8#include "base/path_service.h"
9#include "base/test/launcher/unit_test_launcher.h"
10#include "base/test/test_suite.h"
[email protected]9911b5e2014-05-15 18:33:0511#include "testing/gtest/include/gtest/gtest.h"
[email protected]e319c7e2014-03-14 19:56:1412#include "ui/base/resource/resource_bundle.h"
13#include "ui/base/ui_base_paths.h"
14#include "ui/gl/gl_surface.h"
15
16class WMTestSuite : public base::TestSuite {
17 public:
18 WMTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
19
20 protected:
mostynb3b3d52b2014-10-09 10:54:2721 virtual void Initialize() override {
[email protected]e319c7e2014-03-14 19:56:1422 base::TestSuite::Initialize();
23 gfx::GLSurface::InitializeOneOffForTests();
24 ui::RegisterPathProvider();
25
[email protected]9911b5e2014-05-15 18:33:0526 base::FilePath ui_test_pak_path;
27 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
28 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
[email protected]e319c7e2014-03-14 19:56:1429 }
30
mostynb3b3d52b2014-10-09 10:54:2731 virtual void Shutdown() override {
[email protected]e319c7e2014-03-14 19:56:1432 ui::ResourceBundle::CleanupSharedInstance();
33 base::TestSuite::Shutdown();
34 }
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(WMTestSuite);
38};
39
40int main(int argc, char** argv) {
41 WMTestSuite test_suite(argc, argv);
42
43 return base::LaunchUnitTests(
44 argc, argv, base::Bind(&WMTestSuite::Run, base::Unretained(&test_suite)));
45}