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

Unified Diff: trunk/src/chrome/common/extensions/api/extension_api_unittest.cc

Issue 14328045: Revert 195187 "Revert 195143 "Prevent chrome.app JSON schema fro..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/chrome/common/extensions/api/app.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/common/extensions/api/extension_api_unittest.cc
===================================================================
--- trunk/src/chrome/common/extensions/api/extension_api_unittest.cc (revision 195197)
+++ trunk/src/chrome/common/extensions/api/extension_api_unittest.cc (working copy)
@@ -172,10 +172,14 @@
{ "test2.foo", true, Feature::CONTENT_SCRIPT_CONTEXT, GURL() },
{ "test3", false, Feature::WEB_PAGE_CONTEXT, GURL("http://google.com") },
{ "test3.foo", true, Feature::WEB_PAGE_CONTEXT, GURL("http://google.com") },
- { "test3.foo", true, Feature::BLESSED_EXTENSION_CONTEXT, GURL() },
- { "test4", true, Feature::BLESSED_EXTENSION_CONTEXT, GURL() },
- { "test4.foo", false, Feature::BLESSED_EXTENSION_CONTEXT, GURL() },
- { "test4.foo", false, Feature::UNBLESSED_EXTENSION_CONTEXT, GURL() },
+ { "test3.foo", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ GURL("http://bad.com") },
+ { "test4", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ GURL("http://bad.com") },
+ { "test4.foo", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ GURL("http://bad.com") },
+ { "test4.foo", false, Feature::UNBLESSED_EXTENSION_CONTEXT,
+ GURL("http://bad.com") },
{ "test4.foo.foo", true, Feature::CONTENT_SCRIPT_CONTEXT, GURL() },
{ "test5", true, Feature::WEB_PAGE_CONTEXT, GURL("http://foo.com") },
{ "test5", false, Feature::WEB_PAGE_CONTEXT, GURL("http://bar.com") },
@@ -380,11 +384,12 @@
EXPECT_TRUE(MatchesURL(api.get(), "app", "https://blah.net"));
EXPECT_TRUE(MatchesURL(api.get(), "app", "file://somefile.html"));
- // But not internal URLs (for chrome-extension:// the app API is injected by
- // GetSchemasForExtension).
+ // But not internal URLs.
EXPECT_FALSE(MatchesURL(api.get(), "app", "about:flags"));
EXPECT_FALSE(MatchesURL(api.get(), "app", "chrome://flags"));
- EXPECT_FALSE(MatchesURL(api.get(), "app",
+
+ // "app" should be available to chrome-extension URLs.
+ EXPECT_TRUE(MatchesURL(api.get(), "app",
"chrome-extension://fakeextension"));
// "storage" API (for example) isn't available to any URLs.
« no previous file with comments | « trunk/src/chrome/common/extensions/api/app.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698