| 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 "bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0"))); | 1316 "bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0"))); |
| 1317 EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII( | 1317 EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII( |
| 1318 "bjafgdebaacbbbecmhlhpofkepfkgcpa/2.0"))); | 1318 "bjafgdebaacbbbecmhlhpofkepfkgcpa/2.0"))); |
| 1319 EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII( | 1319 EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII( |
| 1320 "hpiknbiabeeppbpihjehijgoemciehgk/2"))); | 1320 "hpiknbiabeeppbpihjehijgoemciehgk/2"))); |
| 1321 EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII( | 1321 EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII( |
| 1322 "hpiknbiabeeppbpihjehijgoemciehgk/3"))); | 1322 "hpiknbiabeeppbpihjehijgoemciehgk/3"))); |
| 1323 | 1323 |
| 1324 // Make sure update information got deleted. | 1324 // Make sure update information got deleted. |
| 1325 ExtensionPrefs* prefs = service_->extension_prefs(); | 1325 ExtensionPrefs* prefs = service_->extension_prefs(); |
| 1326 EXPECT_FALSE(prefs->GetIdleInstallInfo("bjafgdebaacbbbecmhlhpofkepfkgcpa")); | 1326 EXPECT_FALSE( |
| 1327 prefs->GetDelayedInstallInfo("bjafgdebaacbbbecmhlhpofkepfkgcpa")); |
| 1327 } | 1328 } |
| 1328 | 1329 |
| 1329 // Test installing extensions. This test tries to install few extensions using | 1330 // Test installing extensions. This test tries to install few extensions using |
| 1330 // crx files. If you need to change those crx files, feel free to repackage | 1331 // crx files. If you need to change those crx files, feel free to repackage |
| 1331 // them, throw away the key used and change the id's above. | 1332 // them, throw away the key used and change the id's above. |
| 1332 TEST_F(ExtensionServiceTest, InstallExtension) { | 1333 TEST_F(ExtensionServiceTest, InstallExtension) { |
| 1333 InitializeEmptyExtensionService(); | 1334 InitializeEmptyExtensionService(); |
| 1334 | 1335 |
| 1335 // Extensions not enabled. | 1336 // Extensions not enabled. |
| 1336 set_extensions_enabled(false); | 1337 set_extensions_enabled(false); |
| (...skipping 4439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5776 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); | 5777 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); |
| 5777 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); | 5778 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); |
| 5778 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); | 5779 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); |
| 5779 | 5780 |
| 5780 ExtensionPrefs* prefs = service_->extension_prefs(); | 5781 ExtensionPrefs* prefs = service_->extension_prefs(); |
| 5781 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & | 5782 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & |
| 5782 Extension::DISABLE_SIDELOAD_WIPEOUT); | 5783 Extension::DISABLE_SIDELOAD_WIPEOUT); |
| 5783 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & | 5784 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & |
| 5784 Extension::DISABLE_SIDELOAD_WIPEOUT); | 5785 Extension::DISABLE_SIDELOAD_WIPEOUT); |
| 5785 } | 5786 } |
| OLD | NEW |