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

Unified Diff: chrome/common/extensions/permissions/permissions_data_unittest.cc

Issue 13947050: Stop forcing optional permission on usbDevices section (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove APIPermissionInfo::kFlagMustBeOptional and related tests. Created 7 years, 7 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/common/extensions/permissions/permissions_data_unittest.cc
diff --git a/chrome/common/extensions/permissions/permissions_data_unittest.cc b/chrome/common/extensions/permissions/permissions_data_unittest.cc
index a5458f9f3fc597620715039cb1390a77a0bc1021..fce5d2bb38e66bfa4c0a4b33eb6d95bdb3f7c837 100644
--- a/chrome/common/extensions/permissions/permissions_data_unittest.cc
+++ b/chrome/common/extensions/permissions/permissions_data_unittest.cc
@@ -252,34 +252,6 @@ TEST(ExtensionPermissionsTest, GetPermissionMessages_Plugins) {
#endif
}
-TEST(ExtensionPermissionsTest, OptionalOnlyPermission) {
- // Set feature current channel to dev because the only permission that must
- // be optional (usbDevices) is only available on dev channel.
- Feature::ScopedCurrentChannel scoped_channel(
- chrome::VersionInfo::CHANNEL_DEV);
-
- scoped_refptr<Extension> extension;
- std::string error;
- extension = LoadManifestUnchecked("optional_only_permission",
- "manifest1.json",
- Manifest::INTERNAL, Extension::NO_FLAGS,
- &error);
- EXPECT_TRUE(extension == NULL);
- ASSERT_EQ(
- ErrorUtils::FormatErrorMessage(
- extension_manifest_errors::kPermissionMustBeOptional,
- "usbDevices"),
- error);
-
- error.clear();
- extension = LoadManifestUnchecked("optional_only_permission",
- "manifest2.json",
- Manifest::INTERNAL, Extension::NO_FLAGS,
- &error);
- EXPECT_TRUE(extension != NULL);
- EXPECT_TRUE(error.empty());
-}
-
// Base class for testing the CanExecuteScriptOnPage and CanCaptureVisiblePage
// methods of Extension for extensions with various permissions.
class ExtensionScriptAndCaptureVisibleTest : public testing::Test {

Powered by Google App Engine
This is Rietveld 408576698