| 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/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 crx_installer->set_error_on_unsupported_requirements(true); | 282 crx_installer->set_error_on_unsupported_requirements(true); |
| 283 crx_installer->InstallWebApp( | 283 crx_installer->InstallWebApp( |
| 284 CreateWebAppInfo(kAppTitle, kAppDescription, kAppUrl, 64)); | 284 CreateWebAppInfo(kAppTitle, kAppDescription, kAppUrl, 64)); |
| 285 EXPECT_TRUE(WaitForCrxInstallerDone()); | 285 EXPECT_TRUE(WaitForCrxInstallerDone()); |
| 286 ASSERT_TRUE(crx_installer->extension()); | 286 ASSERT_TRUE(crx_installer->extension()); |
| 287 ASSERT_FALSE(HasRequirementErrors(crx_installer.get())); | 287 ASSERT_FALSE(HasRequirementErrors(crx_installer.get())); |
| 288 ASSERT_FALSE(HasPolicyErrors(crx_installer.get())); | 288 ASSERT_FALSE(HasPolicyErrors(crx_installer.get())); |
| 289 } | 289 } |
| 290 | 290 |
| 291 bool HasRequirementErrors(CrxInstaller* crx_installer) { | 291 bool HasRequirementErrors(CrxInstaller* crx_installer) { |
| 292 return !crx_installer->install_checker_.requirement_errors().empty(); | 292 return !crx_installer->install_checker_.requirement_error_message().empty(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 bool HasPolicyErrors(CrxInstaller* crx_installer) { | 295 bool HasPolicyErrors(CrxInstaller* crx_installer) { |
| 296 return !crx_installer->install_checker_.policy_error().empty(); | 296 return !crx_installer->install_checker_.policy_error().empty(); |
| 297 } | 297 } |
| 298 }; | 298 }; |
| 299 | 299 |
| 300 class ExtensionCrxInstallerTestWithExperimentalApis | 300 class ExtensionCrxInstallerTestWithExperimentalApis |
| 301 : public ExtensionCrxInstallerTest { | 301 : public ExtensionCrxInstallerTest { |
| 302 protected: | 302 protected: |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 EXPECT_TRUE(WaitForCrxInstallerDone()); | 721 EXPECT_TRUE(WaitForCrxInstallerDone()); |
| 722 const Extension* extension = installer->extension(); | 722 const Extension* extension = installer->extension(); |
| 723 ASSERT_TRUE(extension); | 723 ASSERT_TRUE(extension); |
| 724 ASSERT_EQ(extension_id, extension->id()); | 724 ASSERT_EQ(extension_id, extension->id()); |
| 725 EXPECT_TRUE(ExtensionPrefs::Get(profile())->AllowFileAccess(extension_id)); | 725 EXPECT_TRUE(ExtensionPrefs::Get(profile())->AllowFileAccess(extension_id)); |
| 726 EXPECT_TRUE(extension->creation_flags() & Extension::ALLOW_FILE_ACCESS); | 726 EXPECT_TRUE(extension->creation_flags() & Extension::ALLOW_FILE_ACCESS); |
| 727 } | 727 } |
| 728 } | 728 } |
| 729 | 729 |
| 730 } // namespace extensions | 730 } // namespace extensions |
| OLD | NEW |