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

Unified Diff: chrome/test/data/extensions/api_test/content_settings/standard/test.html

Issue 7229012: Use extension match pattern syntax in content settings extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize port 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/content_settings/standard/test.html
diff --git a/chrome/test/data/extensions/api_test/content_settings/standard/test.html b/chrome/test/data/extensions/api_test/content_settings/standard/test.html
index 3a4149e59a32c7ae8e33762412448a44aca43e12..99f47df2e6201004762323dee08b5845ae987f47 100644
--- a/chrome/test/data/extensions/api_test/content_settings/standard/test.html
+++ b/chrome/test/data/extensions/api_test/content_settings/standard/test.html
@@ -65,8 +65,8 @@ chrome.test.runTests([
function setDefaultContentSettings() {
default_content_settings.forEach(function(type, setting) {
cs[type].set({
- 'topLevelPattern': {'pattern': '*'},
- 'embeddedPattern': {'pattern': '*'},
+ 'topLevelPattern': '<all_urls>',
+ 'embeddedPattern': '<all_urls>',
'setting': setting
}, chrome.test.callbackPass());
});
@@ -74,8 +74,8 @@ chrome.test.runTests([
function setContentSettings() {
settings.forEach(function(type, setting) {
cs[type].set({
- 'topLevelPattern': {'pattern': '[*.]google.com'},
- 'embeddedPattern': {'pattern': '[*.]google.com'},
+ 'topLevelPattern': 'http://*.google.com/*',
+ 'embeddedPattern': 'http://*.google.com/*',
'setting': setting
}, chrome.test.callbackPass());
});
@@ -94,6 +94,16 @@ chrome.test.runTests([
'topLevelUrl': '',
'embeddedUrl': 'moo'
}, chrome.test.callbackFail("The URL \"moo\" is invalid."));
+ cs.plugins.set({
+ 'topLevelPattern': 'http://example.com/*',
+ 'embeddedPattern': 'http://example.com/path',
+ 'setting': 'block'
+ }, chrome.test.callbackFail("Specific paths are not allowed."));
+ cs.javascript.set({
+ 'topLevelPattern': 'http://example.com/*',
+ 'embeddedPattern': 'file:///home/hansmoleman/*',
+ 'setting': 'allow'
+ }, chrome.test.callbackFail("Path wildcards in file URL patterns are not allowed."));
}
]);
</script>
« chrome/common/extensions/url_pattern.h ('K') | « chrome/common/extensions/user_script_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698