| 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/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/macros.h" | 7 #include "base/macros.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_discardable_memory_allocator.h" | 10 #include "base/test/test_discardable_memory_allocator.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class MessageCenterTestSuite : public base::TestSuite { | 25 class MessageCenterTestSuite : public base::TestSuite { |
| 26 public: | 26 public: |
| 27 MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} | 27 MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 void Initialize() override { | 30 void Initialize() override { |
| 31 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
| 32 mock_cr_app::RegisterMockCrApp(); | 32 mock_cr_app::RegisterMockCrApp(); |
| 33 #else | 33 #else |
| 34 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 34 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 35 #endif | 35 #endif |
| 36 base::TestSuite::Initialize(); | 36 base::TestSuite::Initialize(); |
| 37 ui::RegisterPathProvider(); | 37 ui::RegisterPathProvider(); |
| 38 | 38 |
| 39 base::FilePath ui_test_pak_path; | 39 base::FilePath ui_test_pak_path; |
| 40 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 40 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| 41 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 41 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 42 | 42 |
| 43 base::DiscardableMemoryAllocator::SetInstance( | 43 base::DiscardableMemoryAllocator::SetInstance( |
| 44 &discardable_memory_allocator_); | 44 &discardable_memory_allocator_); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 int main(int argc, char** argv) { | 60 int main(int argc, char** argv) { |
| 61 MessageCenterTestSuite test_suite(argc, argv); | 61 MessageCenterTestSuite test_suite(argc, argv); |
| 62 | 62 |
| 63 return base::LaunchUnitTests( | 63 return base::LaunchUnitTests( |
| 64 argc, | 64 argc, |
| 65 argv, | 65 argv, |
| 66 base::Bind(&MessageCenterTestSuite::Run, base::Unretained(&test_suite))); | 66 base::Bind(&MessageCenterTestSuite::Run, base::Unretained(&test_suite))); |
| 67 } | 67 } |
| OLD | NEW |