Chromium Code Reviews| Index: chrome/browser/extensions/settings/settings_frontend_unittest.cc |
| diff --git a/chrome/browser/extensions/settings/settings_frontend_unittest.cc b/chrome/browser/extensions/settings/settings_frontend_unittest.cc |
| index 73ee6a1cd2d975525e5ee6c4b91b7ce0bf352153..b083e59d5392f25208037e5dd181186f124108de 100644 |
| --- a/chrome/browser/extensions/settings/settings_frontend_unittest.cc |
| +++ b/chrome/browser/extensions/settings/settings_frontend_unittest.cc |
| @@ -94,8 +94,10 @@ class ExtensionSettingsFrontendTest : public testing::Test { |
| TEST_F(ExtensionSettingsFrontendTest, SettingsPreservedAcrossReconstruction) { |
| const std::string id = "ext"; |
| - profile_->GetMockExtensionService()->AddExtensionWithId( |
| - id, Extension::TYPE_EXTENSION); |
| + ExtensionServiceInterface* esi = static_cast<ExtensionServiceInterface*>( |
|
Yoyo Zhou
2012/11/21 00:27:13
I don't think you need this static_cast (here and
Miranda Callahan
2012/11/26 22:14:24
Done.
|
| + extensions::ExtensionSystem::Get(profile_.get())->extension_service()); |
| + static_cast<extensions::settings_test_util::MockExtensionService*>(esi)-> |
| + AddExtensionWithId(id, Extension::TYPE_EXTENSION); |
| ValueStore* storage = util::GetStorage(id, frontend_.get()); |
| @@ -125,8 +127,10 @@ TEST_F(ExtensionSettingsFrontendTest, SettingsPreservedAcrossReconstruction) { |
| TEST_F(ExtensionSettingsFrontendTest, SettingsClearedOnUninstall) { |
| const std::string id = "ext"; |
| - profile_->GetMockExtensionService()->AddExtensionWithId( |
| - id, Extension::TYPE_LEGACY_PACKAGED_APP); |
| + ExtensionServiceInterface* esi = static_cast<ExtensionServiceInterface*>( |
| + extensions::ExtensionSystem::Get(profile_.get())->extension_service()); |
| + static_cast<extensions::settings_test_util::MockExtensionService*>(esi)-> |
| + AddExtensionWithId(id, Extension::TYPE_LEGACY_PACKAGED_APP); |
| ValueStore* storage = util::GetStorage(id, frontend_.get()); |
| @@ -151,8 +155,10 @@ TEST_F(ExtensionSettingsFrontendTest, SettingsClearedOnUninstall) { |
| TEST_F(ExtensionSettingsFrontendTest, LeveldbDatabaseDeletedFromDiskOnClear) { |
| const std::string id = "ext"; |
| - profile_->GetMockExtensionService()->AddExtensionWithId( |
| - id, Extension::TYPE_EXTENSION); |
| + ExtensionServiceInterface* esi = static_cast<ExtensionServiceInterface*>( |
| + extensions::ExtensionSystem::Get(profile_.get())->extension_service()); |
| + static_cast<extensions::settings_test_util::MockExtensionService*>(esi)-> |
| + AddExtensionWithId(id, Extension::TYPE_EXTENSION); |
| ValueStore* storage = util::GetStorage(id, frontend_.get()); |
| @@ -187,8 +193,10 @@ TEST_F(ExtensionSettingsFrontendTest, LeveldbDatabaseDeletedFromDiskOnClear) { |
| TEST_F(ExtensionSettingsFrontendTest, |
| QuotaLimitsEnforcedCorrectlyForSyncAndLocal) { |
| const std::string id = "ext"; |
| - profile_->GetMockExtensionService()->AddExtensionWithId( |
| - id, Extension::TYPE_EXTENSION); |
| + ExtensionServiceInterface* esi = static_cast<ExtensionServiceInterface*>( |
| + extensions::ExtensionSystem::Get(profile_.get())->extension_service()); |
| + static_cast<extensions::settings_test_util::MockExtensionService*>(esi)-> |
| + AddExtensionWithId(id, Extension::TYPE_EXTENSION); |
| ValueStore* sync_storage = |
| util::GetStorage(id, settings::SYNC, frontend_.get()); |
| @@ -264,8 +272,11 @@ TEST_F(ExtensionSettingsFrontendTest, |
| const std::string id = "ext"; |
| std::set<std::string> permissions; |
| permissions.insert("unlimitedStorage"); |
| - profile_->GetMockExtensionService()->AddExtensionWithIdAndPermissions( |
| - id, Extension::TYPE_EXTENSION, permissions); |
| + ExtensionServiceInterface* esi = static_cast<ExtensionServiceInterface*>( |
| + extensions::ExtensionSystem::Get(profile_.get())->extension_service()); |
| + static_cast<extensions::settings_test_util::MockExtensionService*>(esi)-> |
| + AddExtensionWithIdAndPermissions(id, Extension::TYPE_EXTENSION, |
| + permissions); |
| frontend_->RunWithStorage( |
| id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback)); |