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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
7 #include "base/threading/sequenced_worker_pool.h" | 7 #include "base/threading/sequenced_worker_pool.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 "http://localhost/autoupdate/updates.xml"); | 231 "http://localhost/autoupdate/updates.xml"); |
232 specifics.mutable_extension()->set_version("2"); | 232 specifics.mutable_extension()->set_version("2"); |
233 syncer::SyncData sync_data = | 233 syncer::SyncData sync_data = |
234 syncer::SyncData::CreateRemoteData(1234567, | 234 syncer::SyncData::CreateRemoteData(1234567, |
235 specifics, | 235 specifics, |
236 base::Time::Now(), | 236 base::Time::Now(), |
237 syncer::AttachmentIdList(), | 237 syncer::AttachmentIdList(), |
238 syncer::AttachmentServiceProxy()); | 238 syncer::AttachmentServiceProxy()); |
239 // Sync is installing a new extension, so it pends. | 239 // Sync is installing a new extension, so it pends. |
240 EXPECT_FALSE(sync_service->ProcessExtensionSyncData( | 240 EXPECT_FALSE(sync_service->ProcessExtensionSyncData( |
241 extensions::ExtensionSyncData(sync_data))); | 241 *extensions::ExtensionSyncData::CreateFromSyncData(sync_data))); |
242 | 242 |
243 WaitForExtensionInstall(); | 243 WaitForExtensionInstall(); |
244 content::RunAllBlockingPoolTasksUntilIdle(); | 244 content::RunAllBlockingPoolTasksUntilIdle(); |
245 | 245 |
246 const Extension* extension = service_->GetExtensionById(extension_id, true); | 246 const Extension* extension = service_->GetExtensionById(extension_id, true); |
247 ASSERT_TRUE(extension); | 247 ASSERT_TRUE(extension); |
248 EXPECT_EQ("2", extension->VersionString()); | 248 EXPECT_EQ("2", extension->VersionString()); |
249 EXPECT_EQ(1u, registry_->disabled_extensions().size()); | 249 EXPECT_EQ(1u, registry_->disabled_extensions().size()); |
250 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL, | 250 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL, |
251 ExtensionPrefs::Get(service_->profile()) | 251 ExtensionPrefs::Get(service_->profile()) |
252 ->GetDisableReasons(extension_id)); | 252 ->GetDisableReasons(extension_id)); |
253 EXPECT_TRUE(GetExtensionDisabledGlobalError()); | 253 EXPECT_TRUE(GetExtensionDisabledGlobalError()); |
254 } | 254 } |
OLD | NEW |