| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 434 } |
| 435 | 435 |
| 436 // Our message loop may be used in tests which require it to be an IO loop. | 436 // Our message loop may be used in tests which require it to be an IO loop. |
| 437 ExtensionServiceTestBase::ExtensionServiceTestBase() | 437 ExtensionServiceTestBase::ExtensionServiceTestBase() |
| 438 : loop_(base::MessageLoop::TYPE_IO), | 438 : loop_(base::MessageLoop::TYPE_IO), |
| 439 service_(NULL), | 439 service_(NULL), |
| 440 management_policy_(NULL), | 440 management_policy_(NULL), |
| 441 expected_extensions_count_(0), | 441 expected_extensions_count_(0), |
| 442 ui_thread_(BrowserThread::UI, &loop_), | 442 ui_thread_(BrowserThread::UI, &loop_), |
| 443 db_thread_(BrowserThread::DB, &loop_), | 443 db_thread_(BrowserThread::DB, &loop_), |
| 444 webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &loop_), | |
| 445 file_thread_(BrowserThread::FILE, &loop_), | 444 file_thread_(BrowserThread::FILE, &loop_), |
| 446 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, &loop_), | 445 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, &loop_), |
| 447 io_thread_(BrowserThread::IO, &loop_) { | 446 io_thread_(BrowserThread::IO, &loop_) { |
| 448 base::FilePath test_data_dir; | 447 base::FilePath test_data_dir; |
| 449 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { | 448 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { |
| 450 ADD_FAILURE(); | 449 ADD_FAILURE(); |
| 451 return; | 450 return; |
| 452 } | 451 } |
| 453 data_dir_ = test_data_dir.AppendASCII("extensions"); | 452 data_dir_ = test_data_dir.AppendASCII("extensions"); |
| 454 } | 453 } |
| (...skipping 5817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6272 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path); | 6271 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path); |
| 6273 | 6272 |
| 6274 service_->CheckForExternalUpdates(); | 6273 service_->CheckForExternalUpdates(); |
| 6275 content::WindowedNotificationObserver( | 6274 content::WindowedNotificationObserver( |
| 6276 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 6275 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 6277 content::NotificationService::AllSources()).Wait(); | 6276 content::NotificationService::AllSources()).Wait(); |
| 6278 EXPECT_TRUE(extensions::HasExternalInstallError(service_)); | 6277 EXPECT_TRUE(extensions::HasExternalInstallError(service_)); |
| 6279 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_)); | 6278 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_)); |
| 6280 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore)); | 6279 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore)); |
| 6281 } | 6280 } |
| OLD | NEW |