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

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

Issue 8827013: Move/replace/rename URL-based extension getters from ExtensionService to/in ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: id Created 9 years 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/browser/extensions/extension_info_map_unittest.cc
diff --git a/chrome/browser/extensions/extension_info_map_unittest.cc b/chrome/browser/extensions/extension_info_map_unittest.cc
index b82396039b4ee7ce22b1083e84138bfeae4e5b3f..a0a05a37db9c60f2510b40a21aff7b7991b85246 100644
--- a/chrome/browser/extensions/extension_info_map_unittest.cc
+++ b/chrome/browser/extensions/extension_info_map_unittest.cc
@@ -144,11 +144,11 @@ TEST_F(ExtensionInfoMapTest, CheckPermissions) {
// The app should have the notifications permission, either from a
// chrome-extension URL or from its web extent.
- const Extension* match = info_map->extensions().GetByURL(
+ const Extension* match = info_map->extensions().GetExtensionOrAppByURL(
ExtensionURLInfo(app_origin, app->GetResourceURL("a.html")));
EXPECT_TRUE(match &&
match->HasAPIPermission(ExtensionAPIPermission::kNotification));
- match = info_map->extensions().GetByURL(
+ match = info_map->extensions().GetExtensionOrAppByURL(
ExtensionURLInfo(app_origin, app_url));
EXPECT_TRUE(match &&
match->HasAPIPermission(ExtensionAPIPermission::kNotification));
@@ -156,7 +156,7 @@ TEST_F(ExtensionInfoMapTest, CheckPermissions) {
match->HasAPIPermission(ExtensionAPIPermission::kTab));
// The extension should have the tabs permission.
- match = info_map->extensions().GetByURL(
+ match = info_map->extensions().GetExtensionOrAppByURL(
ExtensionURLInfo(app_origin, extension->GetResourceURL("a.html")));
EXPECT_TRUE(match &&
match->HasAPIPermission(ExtensionAPIPermission::kTab));
@@ -165,12 +165,12 @@ TEST_F(ExtensionInfoMapTest, CheckPermissions) {
// Random URL should not have any permissions.
GURL evil_url("http://evil.com/a.html");
- match = info_map->extensions().GetByURL(
+ match = info_map->extensions().GetExtensionOrAppByURL(
ExtensionURLInfo(WebSecurityOrigin::create(evil_url), evil_url));
EXPECT_FALSE(match);
// Sandboxed origins should not have any permissions.
- match = info_map->extensions().GetByURL(ExtensionURLInfo(
+ match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo(
WebSecurityOrigin::createFromString(WebString::fromUTF8("null")),
app_url));
EXPECT_FALSE(match);
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698