Move action_runner.py out of actions folder prior to moving actions to internal.
[chromium-blink-merge.git] / ui / chromeos / run_all_unittests.cc
bloba677d66e846da4e96e85b07b8b198d865c889580
1 // 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.
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"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h"
14 #include "ui/gl/gl_surface.h"
16 namespace {
18 class UIChromeOSTestSuite : public base::TestSuite {
19 public:
20 UIChromeOSTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
21 ~UIChromeOSTestSuite() override {}
23 protected:
24 void Initialize() override {
25 base::TestSuite::Initialize();
26 gfx::GLSurface::InitializeOneOffForTests();
27 ui::RegisterPathProvider();
29 base::FilePath ui_test_pak_path;
30 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
34 void Shutdown() override {
35 ui::ResourceBundle::CleanupSharedInstance();
36 base::TestSuite::Shutdown();
39 private:
40 DISALLOW_COPY_AND_ASSIGN(UIChromeOSTestSuite);
43 } // namespace
45 int main(int argc, char** argv) {
46 UIChromeOSTestSuite test_suite(argc, argv);
48 return base::LaunchUnitTests(
49 argc,
50 argv,
51 base::Bind(&UIChromeOSTestSuite::Run, base::Unretained(&test_suite)));