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

Unified Diff: extensions/browser/info_map_unittest.cc

Issue 314113010: Remove deprecated permissions functions from Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/info_map.cc ('k') | extensions/common/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/info_map_unittest.cc
diff --git a/extensions/browser/info_map_unittest.cc b/extensions/browser/info_map_unittest.cc
index d01fa61efa4be32fffcf1a8ee5a58d5712c1d74b..c953468c8cbd2f8f5c9df2db11242125b4e3bfcc 100644
--- a/extensions/browser/info_map_unittest.cc
+++ b/extensions/browser/info_map_unittest.cc
@@ -10,6 +10,7 @@
#include "extensions/browser/info_map.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
@@ -144,16 +145,25 @@ TEST_F(InfoMapTest, CheckPermissions) {
// chrome-extension URL or from its web extent.
const Extension* match = info_map->extensions().GetExtensionOrAppByURL(
app->GetResourceURL("a.html"));
- EXPECT_TRUE(match && match->HasAPIPermission(APIPermission::kNotification));
+ EXPECT_TRUE(match &&
+ match->permissions_data()->HasAPIPermission(
+ APIPermission::kNotification));
match = info_map->extensions().GetExtensionOrAppByURL(app_url);
- EXPECT_TRUE(match && match->HasAPIPermission(APIPermission::kNotification));
- EXPECT_FALSE(match && match->HasAPIPermission(APIPermission::kTab));
+ EXPECT_TRUE(match &&
+ match->permissions_data()->HasAPIPermission(
+ APIPermission::kNotification));
+ EXPECT_FALSE(
+ match &&
+ match->permissions_data()->HasAPIPermission(APIPermission::kTab));
// The extension should have the tabs permission.
match = info_map->extensions().GetExtensionOrAppByURL(
extension->GetResourceURL("a.html"));
- EXPECT_TRUE(match && match->HasAPIPermission(APIPermission::kTab));
- EXPECT_FALSE(match && match->HasAPIPermission(APIPermission::kNotification));
+ EXPECT_TRUE(match &&
+ match->permissions_data()->HasAPIPermission(APIPermission::kTab));
+ EXPECT_FALSE(match &&
+ match->permissions_data()->HasAPIPermission(
+ APIPermission::kNotification));
// Random URL should not have any permissions.
GURL evil_url("http://evil.com/a.html");
« no previous file with comments | « extensions/browser/info_map.cc ('k') | extensions/common/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698