| 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 "chrome/browser/ui/app_list/app_list_test_util.h" | 5 #include "chrome/browser/ui/app_list/app_list_test_util.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
| 10 #include "extensions/browser/extension_registry.h" | 10 #include "extensions/browser/extension_registry.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // - 2 packaged extension apps | 30 // - 2 packaged extension apps |
| 31 // - 1 hosted extension app | 31 // - 1 hosted extension app |
| 32 base::FilePath source_install_dir = | 32 base::FilePath source_install_dir = |
| 33 data_dir().AppendASCII("app_list").AppendASCII("Extensions"); | 33 data_dir().AppendASCII("app_list").AppendASCII("Extensions"); |
| 34 base::FilePath pref_path = source_install_dir | 34 base::FilePath pref_path = source_install_dir |
| 35 .DirName() | 35 .DirName() |
| 36 .Append(chrome::kPreferencesFilename); | 36 .Append(chrome::kPreferencesFilename); |
| 37 InitializeInstalledExtensionService(pref_path, source_install_dir); | 37 InitializeInstalledExtensionService(pref_path, source_install_dir); |
| 38 service_->Init(); | 38 service_->Init(); |
| 39 | 39 |
| 40 // ExtensionService needs a real I/O thread. |
| 41 service_->SetFileTaskRunnerForTesting( |
| 42 content::BrowserThread::GetBlockingPool() |
| 43 ->GetSequencedTaskRunnerWithShutdownBehavior( |
| 44 content::BrowserThread::GetBlockingPool()->GetNamedSequenceToken( |
| 45 "ext_install-"), |
| 46 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| 47 |
| 40 // There should be 4 extensions in the test profile. | 48 // There should be 4 extensions in the test profile. |
| 41 ASSERT_EQ(4U, registry()->enabled_extensions().size()); | 49 ASSERT_EQ(4U, registry()->enabled_extensions().size()); |
| 42 } | 50 } |
| OLD | NEW |