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

Side by Side Diff: chrome/common/extensions/extension_unittest.cc

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 // permissions. 1018 // permissions.
1019 skip.insert(Extension::kCookiePermission); 1019 skip.insert(Extension::kCookiePermission);
1020 1020
1021 // The proxy permission is warned as part of host permission checks. 1021 // The proxy permission is warned as part of host permission checks.
1022 skip.insert(Extension::kProxyPermission); 1022 skip.insert(Extension::kProxyPermission);
1023 1023
1024 // This permission requires explicit user action (context menu handler) 1024 // This permission requires explicit user action (context menu handler)
1025 // so we won't prompt for it for now. 1025 // so we won't prompt for it for now.
1026 skip.insert(Extension::kFileBrowserHandlerPermission); 1026 skip.insert(Extension::kFileBrowserHandlerPermission);
1027 1027
1028 // This permission requires explicit user action (context menu handler)
1029 // so we won't prompt for it for now.
1030 skip.insert(Extension::kFileSystemPermission);
1031
1032 // If you've turned on the experimental command-line flag, we don't need 1028 // If you've turned on the experimental command-line flag, we don't need
1033 // to warn you further. 1029 // to warn you further.
1034 skip.insert(Extension::kExperimentalPermission); 1030 skip.insert(Extension::kExperimentalPermission);
1035 1031
1036 // These are only usable by component extensions. 1032 // These are only usable by component extensions.
1037 skip.insert(Extension::kWebstorePrivatePermission); 1033 skip.insert(Extension::kWebstorePrivatePermission);
1038 skip.insert(Extension::kFileBrowserPrivatePermission); 1034 skip.insert(Extension::kFileBrowserPrivatePermission);
1039 skip.insert(Extension::kChromeosInfoPrivatePermissions); 1035 skip.insert(Extension::kChromeosInfoPrivatePermissions);
1040 1036
1041 for (size_t i = 0; i < Extension::kNumPermissions; ++i) { 1037 for (size_t i = 0; i < Extension::kNumPermissions; ++i) {
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 EXPECT_TRUE(Extension::GenerateId("test", &result)); 1533 EXPECT_TRUE(Extension::GenerateId("test", &result));
1538 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); 1534 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf");
1539 1535
1540 EXPECT_TRUE(Extension::GenerateId("_", &result)); 1536 EXPECT_TRUE(Extension::GenerateId("_", &result));
1541 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); 1537 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd");
1542 1538
1543 EXPECT_TRUE(Extension::GenerateId( 1539 EXPECT_TRUE(Extension::GenerateId(
1544 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); 1540 "this_string_is_longer_than_a_single_sha256_hash_digest", &result));
1545 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); 1541 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi");
1546 } 1542 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_manifests_unittest.cc ('k') | chrome/common/extensions/file_browser_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698