| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions_service_unittest.h" | 5 #include "chrome/browser/extensions/extensions_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 path = extensions_path.AppendASCII("theme_with_extension.crx"); | 955 path = extensions_path.AppendASCII("theme_with_extension.crx"); |
| 956 InstallExtension(path, false); | 956 InstallExtension(path, false); |
| 957 ValidatePrefKeyCount(pref_count); | 957 ValidatePrefKeyCount(pref_count); |
| 958 | 958 |
| 959 // A theme with image resources missing (misspelt path). | 959 // A theme with image resources missing (misspelt path). |
| 960 path = extensions_path.AppendASCII("theme_missing_image.crx"); | 960 path = extensions_path.AppendASCII("theme_missing_image.crx"); |
| 961 InstallExtension(path, false); | 961 InstallExtension(path, false); |
| 962 ValidatePrefKeyCount(pref_count); | 962 ValidatePrefKeyCount(pref_count); |
| 963 } | 963 } |
| 964 | 964 |
| 965 // TODO(mpcomplete): temporarily disabled while I fix the test on linux. | 965 TEST_F(ExtensionsServiceTest, InstallApps) { |
| 966 // http://code.google.com/p/chromium/issues/detail?id=41280 | |
| 967 TEST_F(ExtensionsServiceTest, DISABLED_InstallApps) { | |
| 968 InitializeEmptyExtensionsService(); | 966 InitializeEmptyExtensionsService(); |
| 969 FilePath extensions_path; | 967 FilePath extensions_path; |
| 970 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); | 968 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); |
| 971 extensions_path = extensions_path.AppendASCII("extensions"); | 969 extensions_path = extensions_path.AppendASCII("extensions"); |
| 972 | 970 |
| 973 // An empty app. | 971 // An empty app. |
| 974 InstallExtension(extensions_path.AppendASCII("app1.crx"), true); | 972 InstallExtension(extensions_path.AppendASCII("app1.crx"), true); |
| 975 int pref_count = 0; | 973 int pref_count = 0; |
| 976 ValidatePrefKeyCount(++pref_count); | 974 ValidatePrefKeyCount(++pref_count); |
| 977 ValidateIntegerPref(app_crx, L"state", Extension::ENABLED); | 975 ValidateIntegerPref(app_crx, L"state", Extension::ENABLED); |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 // Component extensions shouldn't get recourded in the prefs. | 1944 // Component extensions shouldn't get recourded in the prefs. |
| 1947 ValidatePrefKeyCount(0); | 1945 ValidatePrefKeyCount(0); |
| 1948 | 1946 |
| 1949 // Reload all extensions, and make sure it comes back. | 1947 // Reload all extensions, and make sure it comes back. |
| 1950 std::string extension_id = service_->extensions()->at(0)->id(); | 1948 std::string extension_id = service_->extensions()->at(0)->id(); |
| 1951 loaded_.clear(); | 1949 loaded_.clear(); |
| 1952 service_->ReloadExtensions(); | 1950 service_->ReloadExtensions(); |
| 1953 ASSERT_EQ(1u, service_->extensions()->size()); | 1951 ASSERT_EQ(1u, service_->extensions()->size()); |
| 1954 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); | 1952 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); |
| 1955 } | 1953 } |
| OLD | NEW |