| 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/download/download_crx_util.h" | 5 #include "chrome/browser/download/download_crx_util.h" |
| 6 #include "chrome/browser/download/download_service.h" | 6 #include "chrome/browser/download/download_service.h" |
| 7 #include "chrome/browser/download/download_service_factory.h" | 7 #include "chrome/browser/download/download_service_factory.h" |
| 8 #include "chrome/browser/download/download_test_observer.h" | 8 #include "chrome/browser/download/download_test_observer.h" |
| 9 #include "chrome/browser/extensions/crx_installer.h" | 9 #include "chrome/browser/extensions/crx_installer.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PlatformAppCrx) { | 130 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PlatformAppCrx) { |
| 131 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 131 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 132 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 132 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
| 133 command_line->AppendSwitch(switches::kEnablePlatformApps); | 133 command_line->AppendSwitch(switches::kEnablePlatformApps); |
| 134 EXPECT_TRUE(InstallExtension( | 134 EXPECT_TRUE(InstallExtension( |
| 135 test_data_dir_.AppendASCII("minimal_platform_app.crx"), 1)); | 135 test_data_dir_.AppendASCII("minimal_platform_app.crx"), 1)); |
| 136 } | 136 } |
| 137 | 137 |
| 138 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PackAndInstallExtension) { | 138 // This test is disabled. See bug http://crbug.com/130951 |
| 139 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, |
| 140 DISABLED_PackAndInstallExtension) { |
| 139 if (!extensions::switch_utils::IsOffStoreInstallEnabled()) | 141 if (!extensions::switch_utils::IsOffStoreInstallEnabled()) |
| 140 return; | 142 return; |
| 141 | 143 |
| 142 const int kNumDownloadsExpected = 1; | 144 const int kNumDownloadsExpected = 1; |
| 143 const bool kExpectFileSelectDialog = false; | 145 const bool kExpectFileSelectDialog = false; |
| 144 | 146 |
| 145 LOG(ERROR) << "PackAndInstallExtension: Packing extension"; | 147 LOG(ERROR) << "PackAndInstallExtension: Packing extension"; |
| 146 FilePath crx_path = PackExtension( | 148 FilePath crx_path = PackExtension( |
| 147 test_data_dir_.AppendASCII("common/background_page")); | 149 test_data_dir_.AppendASCII("common/background_page")); |
| 148 ASSERT_FALSE(crx_path.empty()); | 150 ASSERT_FALSE(crx_path.empty()); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 if (kTestData[i]) { | 197 if (kTestData[i]) { |
| 196 EXPECT_EQ(string16(), mock_ui->error()) << kTestData[i]; | 198 EXPECT_EQ(string16(), mock_ui->error()) << kTestData[i]; |
| 197 } else { | 199 } else { |
| 198 EXPECT_EQ(l10n_util::GetStringUTF16( | 200 EXPECT_EQ(l10n_util::GetStringUTF16( |
| 199 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), | 201 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), |
| 200 mock_ui->error()) << kTestData[i]; | 202 mock_ui->error()) << kTestData[i]; |
| 201 } | 203 } |
| 202 } | 204 } |
| 203 #endif | 205 #endif |
| 204 } | 206 } |
| OLD | NEW |