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

Unified Diff: chrome/test/data/extensions/api_test/webrequest/test_declarative.js

Issue 10910179: Event matching by regular expression matching on URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ascii artiste Created 8 years, 3 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 | « chrome/common/extensions/matcher/url_matcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/webrequest/test_declarative.js
diff --git a/chrome/test/data/extensions/api_test/webrequest/test_declarative.js b/chrome/test/data/extensions/api_test/webrequest/test_declarative.js
index adbc139d6db2fe6cbd7c3fa37e5e69d3cf673310..91fb9aeafcb8f1ec5b54b4f52b136cd8c598f889 100644
--- a/chrome/test/data/extensions/api_test/webrequest/test_declarative.js
+++ b/chrome/test/data/extensions/api_test/webrequest/test_declarative.js
@@ -252,6 +252,34 @@ runTests([
);
},
+ function testRegexFilter() {
+ ignoreUnexpected = true;
+ expect(
+ [
+ { label: "onErrorOccurred",
+ event: "onErrorOccurred",
+ details: {
+ url: getURLHttpSimple(),
+ fromCache: false,
+ error: "net::ERR_BLOCKED_BY_CLIENT"
+ }
+ },
+ ],
+ [ ["onErrorOccurred"] ]);
+ onRequest.addRules(
+ [ {'conditions': [
+ new RequestMatcher({
+ 'url': {
+ 'urlMatches': 'simple[A-Z].*a\.html$',
+ 'schemes': ["http"]
+ },
+ })],
+ 'actions': [new CancelRequest()]}
+ ],
+ function() {navigateAndWait(getURLHttpSimple());}
+ );
+ },
+
function testSetRequestHeader() {
ignoreUnexpected = true;
expect(); // Used for initialization.
« no previous file with comments | « chrome/common/extensions/matcher/url_matcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698