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 91fb9aeafcb8f1ec5b54b4f52b136cd8c598f889..9897186dc9de5dedc3b8fc4303b73712531287ba 100644 |
--- a/chrome/test/data/extensions/api_test/webrequest/test_declarative.js |
+++ b/chrome/test/data/extensions/api_test/webrequest/test_declarative.js |
@@ -106,7 +106,7 @@ runTests([ |
'resourceType': ["main_frame"], |
'contentType': ["text/plain"], |
'excludeContentType': ["image/png"], |
- 'responseHeaders': [{ nameContains: ["content", "type"] } ], |
+ 'responseHeaders': [{ nameContains: ["content", "type"] }], |
'excludeResponseHeaders': [{ valueContains: "nonsense" }] })], |
'actions': [new CancelRequest()]} |
], |
@@ -504,4 +504,35 @@ runTests([ |
} |
); |
}, |
+ |
+ function testRequestHeaders() { |
+ 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': { |
+ 'pathSuffix': ".html", |
+ 'ports': [testServerPort, [1000, 2000]], |
+ 'schemes': ["http"] |
+ }, |
+ 'requestHeaders': [{ nameContains: "" }], |
+ 'excludeRequestHeaders': [{ valueContains: ["", "value123"] }] |
+ })], |
+ 'actions': [new CancelRequest()]} |
+ ], |
+ function() {navigateAndWait(getURLHttpSimple());} |
+ ); |
+ }, |
]); |