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

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

Issue 7253001: Added a private chromeAuthPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 skip.insert(Extension::kFileBrowserHandlerPermission); 537 skip.insert(Extension::kFileBrowserHandlerPermission);
538 538
539 // If you've turned on the experimental command-line flag, we don't need 539 // If you've turned on the experimental command-line flag, we don't need
540 // to warn you further. 540 // to warn you further.
541 skip.insert(Extension::kExperimentalPermission); 541 skip.insert(Extension::kExperimentalPermission);
542 542
543 // These are private. 543 // These are private.
544 skip.insert(Extension::kWebstorePrivatePermission); 544 skip.insert(Extension::kWebstorePrivatePermission);
545 skip.insert(Extension::kFileBrowserPrivatePermission); 545 skip.insert(Extension::kFileBrowserPrivatePermission);
546 skip.insert(Extension::kMediaPlayerPrivatePermission); 546 skip.insert(Extension::kMediaPlayerPrivatePermission);
547 skip.insert(Extension::kChromeAuthPrivatePermission);
547 skip.insert(Extension::kChromePrivatePermission); 548 skip.insert(Extension::kChromePrivatePermission);
548 skip.insert(Extension::kChromeosInfoPrivatePermission); 549 skip.insert(Extension::kChromeosInfoPrivatePermission);
549 skip.insert(Extension::kWebSocketProxyPrivatePermission); 550 skip.insert(Extension::kWebSocketProxyPrivatePermission);
550 551
551 const Extension::PermissionMessage::MessageId ID_NONE = 552 const Extension::PermissionMessage::MessageId ID_NONE =
552 Extension::PermissionMessage::ID_NONE; 553 Extension::PermissionMessage::ID_NONE;
553 554
554 for (size_t i = 0; i < Extension::kNumPermissions; ++i) { 555 for (size_t i = 0; i < Extension::kNumPermissions; ++i) {
555 Extension::Permission permission = Extension::kPermissions[i]; 556 Extension::Permission permission = Extension::kPermissions[i];
556 if (skip.count(permission.name)) { 557 if (skip.count(permission.name)) {
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 EXPECT_TRUE(Extension::GenerateId("test", &result)); 1163 EXPECT_TRUE(Extension::GenerateId("test", &result));
1163 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); 1164 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf");
1164 1165
1165 EXPECT_TRUE(Extension::GenerateId("_", &result)); 1166 EXPECT_TRUE(Extension::GenerateId("_", &result));
1166 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); 1167 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd");
1167 1168
1168 EXPECT_TRUE(Extension::GenerateId( 1169 EXPECT_TRUE(Extension::GenerateId(
1169 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); 1170 "this_string_is_longer_than_a_single_sha256_hash_digest", &result));
1170 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); 1171 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi");
1171 } 1172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698