Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Side by Side Diff: chrome/browser/extensions/crx_installer_browsertest.cc

Issue 10511015: Rename --enable-off-store-extension-install to --enable-easy-off... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PackAndInstallExtension) {
139 if (!extensions::switch_utils::IsOffStoreInstallEnabled()) 139 if (!extensions::switch_utils::IsEasyOffStoreInstallEnabled())
140 return; 140 return;
141 141
142 const int kNumDownloadsExpected = 1; 142 const int kNumDownloadsExpected = 1;
143 const bool kExpectFileSelectDialog = false; 143 const bool kExpectFileSelectDialog = false;
144 144
145 LOG(ERROR) << "PackAndInstallExtension: Packing extension"; 145 LOG(ERROR) << "PackAndInstallExtension: Packing extension";
146 FilePath crx_path = PackExtension( 146 FilePath crx_path = PackExtension(
147 test_data_dir_.AppendASCII("common/background_page")); 147 test_data_dir_.AppendASCII("common/background_page"));
148 ASSERT_FALSE(crx_path.empty()); 148 ASSERT_FALSE(crx_path.empty());
149 std::string crx_path_string(crx_path.value().begin(), crx_path.value().end()); 149 std::string crx_path_string(crx_path.value().begin(), crx_path.value().end());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (kTestData[i]) { 195 if (kTestData[i]) {
196 EXPECT_EQ(string16(), mock_ui->error()) << kTestData[i]; 196 EXPECT_EQ(string16(), mock_ui->error()) << kTestData[i];
197 } else { 197 } else {
198 EXPECT_EQ(l10n_util::GetStringUTF16( 198 EXPECT_EQ(l10n_util::GetStringUTF16(
199 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), 199 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE),
200 mock_ui->error()) << kTestData[i]; 200 mock_ui->error()) << kTestData[i];
201 } 201 }
202 } 202 }
203 #endif 203 #endif
204 } 204 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698