| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/metrics/statistics_recorder.h" | 8 #include "base/metrics/statistics_recorder.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 ui::RegisterPathProvider(); | 56 ui::RegisterPathProvider(); |
| 57 | 57 |
| 58 base::FilePath resources_pack_path; | 58 base::FilePath resources_pack_path; |
| 59 #if defined(OS_ANDROID) | 59 #if defined(OS_ANDROID) |
| 60 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &resources_pack_path); | 60 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &resources_pack_path); |
| 61 #else | 61 #else |
| 62 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 62 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
| 63 #endif | 63 #endif |
| 64 ui::ResourceBundle::InitSharedInstanceWithPakPath( | 64 ui::ResourceBundle::InitSharedInstanceWithPakPath( |
| 65 resources_pack_path.AppendASCII("components_unittests_resources.pak")); | 65 resources_pack_path.AppendASCII("components_tests_resources.pak")); |
| 66 | 66 |
| 67 // These schemes need to be added globally to pass tests of | 67 // These schemes need to be added globally to pass tests of |
| 68 // autocomplete_input_unittest.cc and content_settings_pattern* | 68 // autocomplete_input_unittest.cc and content_settings_pattern* |
| 69 url::AddStandardScheme("chrome"); | 69 url::AddStandardScheme("chrome"); |
| 70 url::AddStandardScheme("chrome-extension"); | 70 url::AddStandardScheme("chrome-extension"); |
| 71 url::AddStandardScheme("chrome-devtools"); | 71 url::AddStandardScheme("chrome-devtools"); |
| 72 url::AddStandardScheme("chrome-search"); | 72 url::AddStandardScheme("chrome-search"); |
| 73 | 73 |
| 74 // Not using kExtensionScheme to avoid the dependency to extensions. | 74 // Not using kExtensionScheme to avoid the dependency to extensions. |
| 75 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( | 75 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // The listener will set up common test environment for all components unit | 112 // The listener will set up common test environment for all components unit |
| 113 // tests. | 113 // tests. |
| 114 testing::TestEventListeners& listeners = | 114 testing::TestEventListeners& listeners = |
| 115 testing::UnitTest::GetInstance()->listeners(); | 115 testing::UnitTest::GetInstance()->listeners(); |
| 116 listeners.Append(new ComponentsUnitTestEventListener()); | 116 listeners.Append(new ComponentsUnitTestEventListener()); |
| 117 | 117 |
| 118 return base::LaunchUnitTests( | 118 return base::LaunchUnitTests( |
| 119 argc, argv, base::Bind(&base::TestSuite::Run, | 119 argc, argv, base::Bind(&base::TestSuite::Run, |
| 120 base::Unretained(&test_suite))); | 120 base::Unretained(&test_suite))); |
| 121 } | 121 } |
| OLD | NEW |