Chromium Code Reviews| 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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2074 FilePath(FILE_PATH_LITERAL("web_store"))); | 2074 FilePath(FILE_PATH_LITERAL("web_store"))); |
| 2075 service_->Init(); | 2075 service_->Init(); |
| 2076 | 2076 |
| 2077 ExtensionSorting* sorting = service_->extension_prefs()->extension_sorting(); | 2077 ExtensionSorting* sorting = service_->extension_prefs()->extension_sorting(); |
| 2078 EXPECT_TRUE( | 2078 EXPECT_TRUE( |
| 2079 sorting->GetPageOrdinal(extension_misc::kWebStoreAppId).IsValid()); | 2079 sorting->GetPageOrdinal(extension_misc::kWebStoreAppId).IsValid()); |
| 2080 EXPECT_TRUE( | 2080 EXPECT_TRUE( |
| 2081 sorting->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId).IsValid()); | 2081 sorting->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId).IsValid()); |
| 2082 } | 2082 } |
| 2083 | 2083 |
| 2084 // Flaky failures on Vista. http://crbug.com/145381 | |
| 2085 #if defined(OS_WIN) | |
| 2086 #define MAYBE_InstallAppsWithUnlimitedStorage DISABLED_InstallAppsWithUnlimitedS torage | |
|
sreeram
2012/08/29 18:54:56
Break line here to stay within 80 columns?
#defin
eroman
2012/08/29 18:56:56
Done.
| |
| 2087 #else | |
| 2088 #define MAYBE_InstallAppsWithUnlimitedStorage InstallAppsWithUnlimitedStorage | |
| 2089 #endif | |
| 2090 | |
| 2084 TEST_F(ExtensionServiceTest, InstallAppsWithUnlimitedStorage) { | 2091 TEST_F(ExtensionServiceTest, InstallAppsWithUnlimitedStorage) { |
| 2085 InitializeEmptyExtensionService(); | 2092 InitializeEmptyExtensionService(); |
| 2086 InitializeRequestContext(); | 2093 InitializeRequestContext(); |
| 2087 EXPECT_TRUE(service_->extensions()->is_empty()); | 2094 EXPECT_TRUE(service_->extensions()->is_empty()); |
| 2088 | 2095 |
| 2089 int pref_count = 0; | 2096 int pref_count = 0; |
| 2090 | 2097 |
| 2091 // Install app1 with unlimited storage. | 2098 // Install app1 with unlimited storage. |
| 2092 const Extension* extension = | 2099 const Extension* extension = |
| 2093 PackAndInstallCRX(data_dir_.AppendASCII("app1"), INSTALL_NEW); | 2100 PackAndInstallCRX(data_dir_.AppendASCII("app1"), INSTALL_NEW); |
| (...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5401 // This should NOT trigger an alert. | 5408 // This should NOT trigger an alert. |
| 5402 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", | 5409 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", |
| 5403 data_dir_.AppendASCII("hosted_app.crx")); | 5410 data_dir_.AppendASCII("hosted_app.crx")); |
| 5404 | 5411 |
| 5405 service_->CheckForExternalUpdates(); | 5412 service_->CheckForExternalUpdates(); |
| 5406 loop_.RunAllPending(); | 5413 loop_.RunAllPending(); |
| 5407 | 5414 |
| 5408 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); | 5415 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); |
| 5409 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); | 5416 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); |
| 5410 } | 5417 } |
| OLD | NEW |