Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc |
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc |
index 7ef5524b7e58c30ce60d0c99fc518989b3520daf..0efc9274c26b9c66fc177b3cac73c26a0555a203 100644 |
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc |
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc |
@@ -667,26 +667,28 @@ TEST_F(WebRequestRulesRegistryTest, GetMatchesDifferentUrls) { |
TEST(WebRequestRulesRegistrySimpleTest, StageChecker) { |
// The contentType condition can only be evaluated during ON_HEADERS_RECEIVED |
- // but the redirect action can only be executed during ON_BEFORE_REQUEST. |
+ // but the SetRequestHeader action can only be executed during |
+ // ON_BEFORE_SEND_HEADERS. |
// Therefore, this is an inconsistent rule that needs to be flagged. |
const char kRule[] = |
- "{ \n" |
- " \"id\": \"rule1\", \n" |
- " \"conditions\": [ \n" |
- " { \n" |
- " \"instanceType\": \"declarativeWebRequest.RequestMatcher\", \n" |
- " \"url\": {\"hostSuffix\": \"foo.com\"}, \n" |
- " \"contentType\": [\"image/jpeg\"] \n" |
- " } \n" |
- " ], \n" |
- " \"actions\": [ \n" |
- " { \n" |
- " \"instanceType\": \"declarativeWebRequest.RedirectRequest\",\n" |
- " \"redirectUrl\": \"http://bar.com\" \n" |
- " } \n" |
- " ], \n" |
- " \"priority\": 200 \n" |
- "} "; |
+ "{ \n" |
+ " \"id\": \"rule1\", \n" |
+ " \"conditions\": [ \n" |
+ " { \n" |
+ " \"instanceType\": \"declarativeWebRequest.RequestMatcher\", \n" |
+ " \"url\": {\"hostSuffix\": \"foo.com\"}, \n" |
+ " \"contentType\": [\"image/jpeg\"] \n" |
+ " } \n" |
+ " ], \n" |
+ " \"actions\": [ \n" |
+ " { \n" |
+ " \"instanceType\": \"declarativeWebRequest.SetRequestHeader\",\n" |
+ " \"name\": \"Content-Type\", \n" |
+ " \"value\": \"text/plain\" \n" |
+ " } \n" |
+ " ], \n" |
+ " \"priority\": 200 \n" |
+ "} "; |
scoped_ptr<base::Value> value(base::JSONReader::Read(kRule)); |
ASSERT_TRUE(value); |