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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher_browsertest.cc

Issue 384423002: [Canceled] Extensions: Add install_flags parameter to ManagementPolicy::UserMayLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/message_loop/message_loop_proxy.h" 5 #include "base/message_loop/message_loop_proxy.h"
6 #include "chrome/browser/apps/ephemeral_app_launcher.h" 6 #include "chrome/browser/apps/ephemeral_app_launcher.h"
7 #include "chrome/browser/extensions/extension_install_checker.h" 7 #include "chrome/browser/extensions/extension_install_checker.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/extensions/test_blacklist.h" 10 #include "chrome/browser/extensions/test_blacklist.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 class ManagementPolicyMock : public extensions::ManagementPolicy::Provider { 168 class ManagementPolicyMock : public extensions::ManagementPolicy::Provider {
169 public: 169 public:
170 ManagementPolicyMock() {} 170 ManagementPolicyMock() {}
171 171
172 virtual std::string GetDebugPolicyProviderName() const OVERRIDE { 172 virtual std::string GetDebugPolicyProviderName() const OVERRIDE {
173 return "ManagementPolicyMock"; 173 return "ManagementPolicyMock";
174 } 174 }
175 175
176 virtual bool UserMayLoad(const Extension* extension, 176 virtual bool UserMayLoad(const Extension* extension,
177 int install_flags,
177 base::string16* error) const OVERRIDE { 178 base::string16* error) const OVERRIDE {
178 return false; 179 return false;
179 } 180 }
180 }; 181 };
181 182
182 } // namespace 183 } // namespace
183 184
184 class EphemeralAppLauncherTest : public WebstoreInstallerTest { 185 class EphemeralAppLauncherTest : public WebstoreInstallerTest {
185 public: 186 public:
186 EphemeralAppLauncherTest() 187 EphemeralAppLauncherTest()
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // Verifies that an installed app with unsupported requirements cannot be 513 // Verifies that an installed app with unsupported requirements cannot be
513 // launched. 514 // launched.
514 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, 515 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest,
515 LaunchAppWithUnsupportedRequirements) { 516 LaunchAppWithUnsupportedRequirements) {
516 const Extension* app = InstallAndDisableApp( 517 const Extension* app = InstallAndDisableApp(
517 kDefaultAppTestPath, Extension::DISABLE_UNSUPPORTED_REQUIREMENT); 518 kDefaultAppTestPath, Extension::DISABLE_UNSUPPORTED_REQUIREMENT);
518 ASSERT_TRUE(app); 519 ASSERT_TRUE(app);
519 520
520 RunLaunchTest(app->id(), webstore_install::REQUIREMENT_VIOLATIONS, false); 521 RunLaunchTest(app->id(), webstore_install::REQUIREMENT_VIOLATIONS, false);
521 } 522 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/ephemeral_app_launcher.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698