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 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 FilePath(FILE_PATH_LITERAL("web_store"))); | 2075 FilePath(FILE_PATH_LITERAL("web_store"))); |
2076 service_->Init(); | 2076 service_->Init(); |
2077 | 2077 |
2078 ExtensionSorting* sorting = service_->extension_prefs()->extension_sorting(); | 2078 ExtensionSorting* sorting = service_->extension_prefs()->extension_sorting(); |
2079 EXPECT_TRUE( | 2079 EXPECT_TRUE( |
2080 sorting->GetPageOrdinal(extension_misc::kWebStoreAppId).IsValid()); | 2080 sorting->GetPageOrdinal(extension_misc::kWebStoreAppId).IsValid()); |
2081 EXPECT_TRUE( | 2081 EXPECT_TRUE( |
2082 sorting->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId).IsValid()); | 2082 sorting->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId).IsValid()); |
2083 } | 2083 } |
2084 | 2084 |
2085 TEST_F(ExtensionServiceTest, InstallAppsWithUnlimitedStorage) { | 2085 // Flaky failures on Vista. http://crbug.com/145381 |
| 2086 #if defined(OS_WIN) |
| 2087 #define MAYBE_InstallAppsWithUnlimitedStorage \ |
| 2088 DISABLED_InstallAppsWithUnlimitedStorage |
| 2089 #else |
| 2090 #define MAYBE_InstallAppsWithUnlimitedStorage InstallAppsWithUnlimitedStorage |
| 2091 #endif |
| 2092 |
| 2093 TEST_F(ExtensionServiceTest, MAYBE_InstallAppsWithUnlimitedStorage) { |
2086 InitializeEmptyExtensionService(); | 2094 InitializeEmptyExtensionService(); |
2087 InitializeRequestContext(); | 2095 InitializeRequestContext(); |
2088 EXPECT_TRUE(service_->extensions()->is_empty()); | 2096 EXPECT_TRUE(service_->extensions()->is_empty()); |
2089 | 2097 |
2090 int pref_count = 0; | 2098 int pref_count = 0; |
2091 | 2099 |
2092 // Install app1 with unlimited storage. | 2100 // Install app1 with unlimited storage. |
2093 const Extension* extension = | 2101 const Extension* extension = |
2094 PackAndInstallCRX(data_dir_.AppendASCII("app1"), INSTALL_NEW); | 2102 PackAndInstallCRX(data_dir_.AppendASCII("app1"), INSTALL_NEW); |
2095 ValidatePrefKeyCount(++pref_count); | 2103 ValidatePrefKeyCount(++pref_count); |
(...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5404 // This should NOT trigger an alert. | 5412 // This should NOT trigger an alert. |
5405 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", | 5413 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", |
5406 data_dir_.AppendASCII("hosted_app.crx")); | 5414 data_dir_.AppendASCII("hosted_app.crx")); |
5407 | 5415 |
5408 service_->CheckForExternalUpdates(); | 5416 service_->CheckForExternalUpdates(); |
5409 loop_.RunAllPending(); | 5417 loop_.RunAllPending(); |
5410 | 5418 |
5411 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); | 5419 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); |
5412 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); | 5420 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); |
5413 } | 5421 } |
OLD | NEW |