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

Unified Diff: tools/json_schema_compiler/test/any_unittest.cc

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Tested GetAllPossibleParameterLists better. Created 8 years, 5 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: tools/json_schema_compiler/test/any_unittest.cc
diff --git a/tools/json_schema_compiler/test/any_unittest.cc b/tools/json_schema_compiler/test/any_unittest.cc
index 07802305c9ff5203a201a1a64129d57d93f35911..c0b464f1d22bf18ba65001d7195aba8713e37717 100644
--- a/tools/json_schema_compiler/test/any_unittest.cc
+++ b/tools/json_schema_compiler/test/any_unittest.cc
@@ -4,23 +4,25 @@
#include "tools/json_schema_compiler/test/any.h"
+#include "chrome/common/extensions/value_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
using namespace test::api::any;
+using namespace extensions;
TEST(JsonSchemaCompilerAnyTest, AnyTypePopulate) {
{
AnyType any_type;
- scoped_ptr<DictionaryValue> any_type_value(new DictionaryValue());
- any_type_value->SetString("any", "value");
+ scoped_ptr<DictionaryValue> any_type_value(
+ DictionaryBuilder().Set("any", "value").Build());
EXPECT_TRUE(AnyType::Populate(*any_type_value, &any_type));
scoped_ptr<Value> any_type_to_value(any_type.ToValue());
EXPECT_TRUE(any_type_value->Equals(any_type_to_value.get()));
}
{
AnyType any_type;
- scoped_ptr<DictionaryValue> any_type_value(new DictionaryValue());
- any_type_value->SetInteger("any", 5);
+ scoped_ptr<DictionaryValue> any_type_value(
+ DictionaryBuilder().Set("any", 5).Build());
EXPECT_TRUE(AnyType::Populate(*any_type_value, &any_type));
scoped_ptr<Value> any_type_to_value(any_type.ToValue());
EXPECT_TRUE(any_type_value->Equals(any_type_to_value.get()));

Powered by Google App Engine
This is Rietveld 408576698