| Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| index df0771dc38d8a0cb0b384b02e403dcab69a8fc60..735621b6d2c5927560b01238d4e9dc19b02e0319 100644
|
| --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
| @@ -91,22 +91,15 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
|
| URLMatcher matcher;
|
|
|
| WebRequestConditionSet::AnyVector conditions;
|
| -
|
| - linked_ptr<json_schema_compiler::any::Any> condition1 = make_linked_ptr(
|
| - new json_schema_compiler::any::Any);
|
| - condition1->Init(*base::test::ParseJson(
|
| + conditions.push_back(linked_ptr<base::Value>(base::test::ParseJson(
|
| "{ \n"
|
| " \"instanceType\": \"declarativeWebRequest.RequestMatcher\", \n"
|
| " \"url\": { \n"
|
| " \"hostSuffix\": \"example.com\", \n"
|
| " \"schemes\": [\"http\"], \n"
|
| " }, \n"
|
| - "}"));
|
| - conditions.push_back(condition1);
|
| -
|
| - linked_ptr<json_schema_compiler::any::Any> condition2 = make_linked_ptr(
|
| - new json_schema_compiler::any::Any);
|
| - condition2->Init(*base::test::ParseJson(
|
| + "}").release()));
|
| + conditions.push_back(linked_ptr<base::Value>(base::test::ParseJson(
|
| "{ \n"
|
| " \"instanceType\": \"declarativeWebRequest.RequestMatcher\", \n"
|
| " \"url\": { \n"
|
| @@ -114,8 +107,7 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
|
| " \"hostPrefix\": \"www\", \n"
|
| " \"schemes\": [\"https\"], \n"
|
| " }, \n"
|
| - "}"));
|
| - conditions.push_back(condition2);
|
| + "}").release()));
|
|
|
| // Test insertion
|
| std::string error;
|
| @@ -180,18 +172,15 @@ TEST(WebRequestConditionTest, TestPortFilter) {
|
| MessageLoop message_loop(MessageLoop::TYPE_IO);
|
| URLMatcher matcher;
|
|
|
| - linked_ptr<json_schema_compiler::any::Any> any_condition =
|
| - make_linked_ptr(new json_schema_compiler::any::Any);
|
| - any_condition->Init(*base::test::ParseJson(
|
| + WebRequestConditionSet::AnyVector conditions;
|
| + conditions.push_back(linked_ptr<base::Value>(base::test::ParseJson(
|
| "{ \n"
|
| " \"instanceType\": \"declarativeWebRequest.RequestMatcher\", \n"
|
| " \"url\": { \n"
|
| " \"ports\": [80, [1000, 1010]], \n" // Allow 80;1000-1010.
|
| " \"hostSuffix\": \"example.com\", \n"
|
| " }, \n"
|
| - "}"));
|
| - WebRequestConditionSet::AnyVector conditions;
|
| - conditions.push_back(any_condition);
|
| + "}").release()));
|
|
|
| // Test insertion
|
| std::string error;
|
|
|