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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/test/launcher/unit_test_launcher.h" | 10 #include "base/test/launcher/unit_test_launcher.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 protected: | 36 protected: |
37 void Initialize() override { | 37 void Initialize() override { |
38 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 38 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
39 command_line->AppendSwitchASCII(kTestType, "applist"); | 39 command_line->AppendSwitchASCII(kTestType, "applist"); |
40 | 40 |
41 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
42 mock_cr_app::RegisterMockCrApp(); | 42 mock_cr_app::RegisterMockCrApp(); |
43 #endif | 43 #endif |
44 #if defined(TOOLKIT_VIEWS) | 44 #if defined(TOOLKIT_VIEWS) |
45 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 45 gl::GLSurfaceTestSupport::InitializeOneOff(); |
46 #endif | 46 #endif |
47 base::TestSuite::Initialize(); | 47 base::TestSuite::Initialize(); |
48 ui::RegisterPathProvider(); | 48 ui::RegisterPathProvider(); |
49 | 49 |
50 base::FilePath ui_test_pak_path; | 50 base::FilePath ui_test_pak_path; |
51 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 51 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
52 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 52 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
53 | 53 |
54 base::DiscardableMemoryAllocator::SetInstance( | 54 base::DiscardableMemoryAllocator::SetInstance( |
55 &discardable_memory_allocator_); | 55 &discardable_memory_allocator_); |
(...skipping 13 matching lines...) Expand all Loading... |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 int main(int argc, char** argv) { | 71 int main(int argc, char** argv) { |
72 AppListTestSuite test_suite(argc, argv); | 72 AppListTestSuite test_suite(argc, argv); |
73 | 73 |
74 return base::LaunchUnitTests( | 74 return base::LaunchUnitTests( |
75 argc, | 75 argc, |
76 argv, | 76 argv, |
77 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); | 77 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); |
78 } | 78 } |
OLD | NEW |