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

Unified Diff: chrome/browser/extensions/extension_functional_browsertest.cc

Issue 25366003: Moved some functions off ExtensionService into a new file extension_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile failures Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_functional_browsertest.cc
diff --git a/chrome/browser/extensions/extension_functional_browsertest.cc b/chrome/browser/extensions/extension_functional_browsertest.cc
index 19c7e0ad143c2e96d1c76b750b3686ada3ebcf69..78bc0988a622612c3936d63c71658f323b28baba 100644
--- a/chrome/browser/extensions/extension_functional_browsertest.cc
+++ b/chrome/browser/extensions/extension_functional_browsertest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -65,7 +66,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, TestAdblockExtensionCrash) {
// Verify that the extension is enabled and allowed in incognito
// is disabled.
EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id_));
- EXPECT_FALSE(service->IsIncognitoEnabled(last_loaded_extension_id_));
+ EXPECT_FALSE(extension_util::IsIncognitoEnabled(last_loaded_extension_id_,
+ service));
}
IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, TestSetExtensionsState) {
@@ -73,24 +75,30 @@ IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, TestSetExtensionsState) {
InstallExtensionSilently(service, "google_talk.crx");
// Disable the extension and verify.
- service->SetIsIncognitoEnabled(last_loaded_extension_id_, false);
+ extension_util::SetIsIncognitoEnabled(
+ last_loaded_extension_id_, service, false);
service->DisableExtension(last_loaded_extension_id_,
Extension::DISABLE_USER_ACTION);
EXPECT_FALSE(service->IsExtensionEnabled(last_loaded_extension_id_));
// Enable the extension and verify.
- service->SetIsIncognitoEnabled(last_loaded_extension_id_, false);
+ extension_util::SetIsIncognitoEnabled(
+ last_loaded_extension_id_, service, false);
service->EnableExtension(last_loaded_extension_id_);
EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id_));
// Allow extension in incognito mode and verify.
service->EnableExtension(last_loaded_extension_id_);
- service->SetIsIncognitoEnabled(last_loaded_extension_id_, true);
- EXPECT_TRUE(service->IsIncognitoEnabled(last_loaded_extension_id_));
+ extension_util::SetIsIncognitoEnabled(
+ last_loaded_extension_id_, service, true);
+ EXPECT_TRUE(extension_util::IsIncognitoEnabled(last_loaded_extension_id_,
+ service));
// Disallow extension in incognito mode and verify.
service->EnableExtension(last_loaded_extension_id_);
- service->SetIsIncognitoEnabled(last_loaded_extension_id_, false);
- EXPECT_FALSE(service->IsIncognitoEnabled(last_loaded_extension_id_));
+ extension_util::SetIsIncognitoEnabled(
+ last_loaded_extension_id_, service, false);
+ EXPECT_FALSE(extension_util::IsIncognitoEnabled(last_loaded_extension_id_,
+ service));
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698