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

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

Issue 11415216: Make Blacklist::IsBlacklist asynchronous (it will need to be for safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another test Created 8 years 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/extensions/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include "chrome/browser/extensions/extension_service_unittest.h" 7 #include "chrome/browser/extensions/extension_service_unittest.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/extensions/test_management_policy.h" 9 #include "chrome/browser/extensions/test_management_policy.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Actions should be enabled. 53 // Actions should be enabled.
54 ASSERT_TRUE(menu->IsCommandIdEnabled(ExtensionContextMenuModel::UNINSTALL)); 54 ASSERT_TRUE(menu->IsCommandIdEnabled(ExtensionContextMenuModel::UNINSTALL));
55 55
56 extensions::TestManagementPolicyProvider policy_provider( 56 extensions::TestManagementPolicyProvider policy_provider(
57 extensions::TestManagementPolicyProvider::PROHIBIT_MODIFY_STATUS); 57 extensions::TestManagementPolicyProvider::PROHIBIT_MODIFY_STATUS);
58 system->management_policy()->RegisterProvider(&policy_provider); 58 system->management_policy()->RegisterProvider(&policy_provider);
59 59
60 // Now the actions are disabled. 60 // Now the actions are disabled.
61 ASSERT_FALSE(menu->IsCommandIdEnabled(ExtensionContextMenuModel::UNINSTALL)); 61 ASSERT_FALSE(menu->IsCommandIdEnabled(ExtensionContextMenuModel::UNINSTALL));
62
63 // Don't leave |policy_provider| dangling.
64 system->management_policy()->UnregisterAllProviders();
62 } 65 }
63 66
64 } // namespace 67 } // namespace
65 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_error_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698