| 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 "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 5490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 | 5501 |
| 5502 // Wait for the external source to install. | 5502 // Wait for the external source to install. |
| 5503 WaitForCrxInstall(crx_path_, INSTALL_NEW); | 5503 WaitForCrxInstall(crx_path_, INSTALL_NEW); |
| 5504 ASSERT_TRUE(IsCrxInstalled()); | 5504 ASSERT_TRUE(IsCrxInstalled()); |
| 5505 | 5505 |
| 5506 // Now that the extension is installed, sync request should fail | 5506 // Now that the extension is installed, sync request should fail |
| 5507 // because the extension is already installed. | 5507 // because the extension is already installed. |
| 5508 ASSERT_FALSE(AddPendingSyncInstall()); | 5508 ASSERT_FALSE(AddPendingSyncInstall()); |
| 5509 } | 5509 } |
| 5510 | 5510 |
| 5511 #if !defined(OS_CHROMEOS) |
| 5511 TEST_F(ExtensionServiceTest, AlertableExtensionHappyPath) { | 5512 TEST_F(ExtensionServiceTest, AlertableExtensionHappyPath) { |
| 5512 InitializeEmptyExtensionService(); | 5513 InitializeEmptyExtensionService(); |
| 5513 scoped_ptr<ExtensionErrorUI> extension_error_ui( | 5514 scoped_ptr<ExtensionErrorUI> extension_error_ui( |
| 5514 ExtensionErrorUI::Create(service_)); | 5515 ExtensionErrorUI::Create(service_)); |
| 5515 MockExtensionProvider* provider = | 5516 MockExtensionProvider* provider = |
| 5516 new MockExtensionProvider(service_, Extension::EXTERNAL_PREF); | 5517 new MockExtensionProvider(service_, Extension::EXTERNAL_PREF); |
| 5517 AddMockExternalProvider(provider); | 5518 AddMockExternalProvider(provider); |
| 5518 | 5519 |
| 5519 // Should return false, meaning there aren't any extensions that the user | 5520 // Should return false, meaning there aren't any extensions that the user |
| 5520 // needs to know about. | 5521 // needs to know about. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5535 // This should NOT trigger an alert. | 5536 // This should NOT trigger an alert. |
| 5536 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", | 5537 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", |
| 5537 data_dir_.AppendASCII("hosted_app.crx")); | 5538 data_dir_.AppendASCII("hosted_app.crx")); |
| 5538 | 5539 |
| 5539 service_->CheckForExternalUpdates(); | 5540 service_->CheckForExternalUpdates(); |
| 5540 loop_.RunAllPending(); | 5541 loop_.RunAllPending(); |
| 5541 | 5542 |
| 5542 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); | 5543 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); |
| 5543 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); | 5544 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); |
| 5544 } | 5545 } |
| 5546 #endif |
| OLD | NEW |