OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/test/launcher/unit_test_launcher.h" | 9 #include "base/test/launcher/unit_test_launcher.h" |
10 #include "base/test/test_suite.h" | 10 #include "base/test/test_suite.h" |
11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/base/ui_base_paths.h" | 12 #include "ui/base/ui_base_paths.h" |
13 | 13 |
14 #if !defined(OS_MACOSX) | 14 #if !defined(OS_MACOSX) |
15 #include "ui/gl/gl_surface.h" | 15 #include "ui/gl/gl_surface.h" |
16 #endif | 16 #endif |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class AppListTestSuite : public base::TestSuite { | 20 class AppListTestSuite : public base::TestSuite { |
21 public: | 21 public: |
22 AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} | 22 AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
23 | 23 |
24 protected: | 24 protected: |
25 virtual void Initialize() OVERRIDE { | 25 virtual void Initialize() OVERRIDE { |
26 #if !defined(OS_MACOSX) | 26 #if !defined(OS_MACOSX) |
27 gfx::GLSurface::InitializeOneOffForTests(true); | 27 gfx::GLSurface::InitializeOneOffForTests(); |
28 #endif | 28 #endif |
29 base::TestSuite::Initialize(); | 29 base::TestSuite::Initialize(); |
30 ui::RegisterPathProvider(); | 30 ui::RegisterPathProvider(); |
31 | 31 |
32 base::FilePath pak_dir; | 32 base::FilePath pak_dir; |
33 PathService::Get(base::DIR_MODULE, &pak_dir); | 33 PathService::Get(base::DIR_MODULE, &pak_dir); |
34 | 34 |
35 base::FilePath pak_file; | 35 base::FilePath pak_file; |
36 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); | 36 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); |
37 | 37 |
(...skipping 12 matching lines...) Expand all Loading... |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 int main(int argc, char** argv) { | 52 int main(int argc, char** argv) { |
53 AppListTestSuite test_suite(argc, argv); | 53 AppListTestSuite test_suite(argc, argv); |
54 | 54 |
55 return base::LaunchUnitTests( | 55 return base::LaunchUnitTests( |
56 argc, | 56 argc, |
57 argv, | 57 argv, |
58 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); | 58 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); |
59 } | 59 } |
OLD | NEW |