| 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 250d2c8644812e3dedeea196f5749637b394423f..6cbb1da9e3b0a8e67fd27d5c49a48c434e398269 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
|
| @@ -622,45 +622,6 @@ TEST_F(WebRequestRulesRegistryTest, GetMatchesDifferentUrls) {
|
| }
|
| }
|
|
|
| -TEST_F(WebRequestRulesRegistryTest, CheckConsistency) {
|
| - // The contentType condition can only be evaluated during ON_HEADERS_RECEIVED
|
| - // but the redirect action can only be executed during ON_BEFORE_REQUEST.
|
| - // 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"
|
| - "} ";
|
| -
|
| - scoped_ptr<Value> value(base::JSONReader::Read(kRule));
|
| - ASSERT_TRUE(value.get());
|
| -
|
| - std::vector<linked_ptr<RulesRegistry::Rule> > rules;
|
| - rules.push_back(make_linked_ptr(new RulesRegistry::Rule));
|
| - ASSERT_TRUE(RulesRegistry::Rule::Populate(*value, rules.back().get()));
|
| -
|
| - scoped_refptr<WebRequestRulesRegistry> registry(
|
| - new TestWebRequestRulesRegistry());
|
| -
|
| - URLMatcher matcher;
|
| - std::string error = registry->AddRulesImpl(kExtensionId, rules);
|
| - EXPECT_THAT(error, HasSubstr("no time in the request life-cycle"));
|
| - EXPECT_TRUE(registry->IsEmpty());
|
| -}
|
| -
|
| TEST_F(WebRequestRulesRegistryTest, CheckOriginAndPathRegEx) {
|
| const char kRule[] =
|
| "{ \n"
|
|
|