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

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

Issue 1076393002: Revert of Cache --whitelisted-extension-id in SimpleFeature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/test_extension_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/permission_message_combinations_unittest.cc
diff --git a/chrome/browser/extensions/permission_message_combinations_unittest.cc b/chrome/browser/extensions/permission_message_combinations_unittest.cc
index 66046869b2ce1ff4d2d8d6dfb02d477139049d7b..7581ff1d42618ca91b4167cdc2b85899086ceaf3 100644
--- a/chrome/browser/extensions/permission_message_combinations_unittest.cc
+++ b/chrome/browser/extensions/permission_message_combinations_unittest.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/extensions/test_extension_environment.h"
#include "chrome/common/extensions/permissions/chrome_permission_message_provider.h"
#include "extensions/common/extension.h"
-#include "extensions/common/features/simple_feature.h"
#include "extensions/common/permissions/permission_message_test_util.h"
#include "extensions/common/permissions/permissions_data.h"
#include "extensions/common/switches.h"
@@ -17,15 +16,12 @@
namespace extensions {
-const char kWhitelistedExtensionID[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-
// Tests that ChromePermissionMessageProvider produces the expected messages for
// various combinations of app/extension permissions.
class PermissionMessageCombinationsUnittest : public testing::Test {
public:
PermissionMessageCombinationsUnittest()
- : message_provider_(new ChromePermissionMessageProvider()),
- whitelisted_extension_id_(kWhitelistedExtensionID) {}
+ : message_provider_(new ChromePermissionMessageProvider()) {}
~PermissionMessageCombinationsUnittest() override {}
// Overridden from testing::Test:
@@ -43,8 +39,10 @@
std::replace(json_manifest_with_double_quotes.begin(),
json_manifest_with_double_quotes.end(), '\'', '"');
app_ = env_.MakeExtension(
- *base::test::ParseJson(json_manifest_with_double_quotes),
- kWhitelistedExtensionID);
+ *base::test::ParseJson(json_manifest_with_double_quotes));
+ // Add the app to any whitelists so we can test all permissions.
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kWhitelistedExtensionID, app_->id());
}
// Checks whether the currently installed app or extension produces the given
@@ -199,9 +197,6 @@
extensions::TestExtensionEnvironment env_;
scoped_ptr<ChromePermissionMessageProvider> message_provider_;
scoped_refptr<const Extension> app_;
- // Whitelist a known extension id so we can test all permissions. This ID
- // will be used for each test app.
- extensions::SimpleFeature::ScopedWhitelistForTest whitelisted_extension_id_;
DISALLOW_COPY_AND_ASSIGN(PermissionMessageCombinationsUnittest);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/test_extension_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698