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

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

Issue 13852042: Revert 195143 "Prevent chrome.app JSON schema from loading on ev..." (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
Index: trunk/src/chrome/common/extensions/api/extension_api_unittest.cc
===================================================================
--- trunk/src/chrome/common/extensions/api/extension_api_unittest.cc (revision 195229)
+++ trunk/src/chrome/common/extensions/api/extension_api_unittest.cc (working copy)
@@ -172,14 +172,10 @@
{ "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("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") },
+ { "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() },
{ "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") },
@@ -384,12 +380,11 @@
EXPECT_TRUE(MatchesURL(api.get(), "app", "https://blah.net"));
EXPECT_TRUE(MatchesURL(api.get(), "app", "file://somefile.html"));
- // But not internal URLs.
+ // But not internal URLs (for chrome-extension:// the app API is injected by
+ // GetSchemasForExtension).
EXPECT_FALSE(MatchesURL(api.get(), "app", "about:flags"));
EXPECT_FALSE(MatchesURL(api.get(), "app", "chrome://flags"));
-
- // "app" should be available to chrome-extension URLs.
- EXPECT_TRUE(MatchesURL(api.get(), "app",
+ EXPECT_FALSE(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') | trunk/src/chrome/renderer/extensions/chrome_v8_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698