ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / ui / app_list / test / run_all_unittests.cc
blobb60b438559fc54a0ea94ec1e44207b00db268f85
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"
15 #if defined(OS_MACOSX)
16 #include "base/test/mock_chrome_application_mac.h"
17 #endif
19 #if defined(TOOLKIT_VIEWS)
20 #include "ui/gl/gl_surface.h"
21 #endif
23 namespace {
25 class AppListTestSuite : public base::TestSuite {
26 public:
27 AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
29 protected:
30 void Initialize() override {
31 #if defined(OS_MACOSX)
32 mock_cr_app::RegisterMockCrApp();
33 #endif
34 #if defined(TOOLKIT_VIEWS)
35 gfx::GLSurface::InitializeOneOffForTests();
36 #endif
37 base::TestSuite::Initialize();
38 ui::RegisterPathProvider();
40 base::FilePath ui_test_pak_path;
41 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
42 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
45 void Shutdown() override {
46 ui::ResourceBundle::CleanupSharedInstance();
47 base::TestSuite::Shutdown();
50 private:
51 DISALLOW_COPY_AND_ASSIGN(AppListTestSuite);
54 } // namespace
56 int main(int argc, char** argv) {
57 AppListTestSuite test_suite(argc, argv);
59 return base::LaunchUnitTests(
60 argc,
61 argv,
62 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite)));