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

Unified Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
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 0db6afbd0f44bebd7e79894c6dae51d40c89069d..2fa6268a3a7b03e66386f9145ef24e6bf5c63da3 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
@@ -178,22 +178,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"
@@ -201,8 +194,7 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
" \"hostPrefix\": \"www\", \n"
" \"schemes\": [\"https\"], \n"
" }, \n"
- "}"));
- conditions.push_back(condition2);
+ "}").release()));
// Test insertion
std::string error;
@@ -257,18 +249,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;

Powered by Google App Engine
This is Rietveld 408576698