// Test Function2, which takes an integer parameter.
base::ListValue list;
- list.Append(base::Value::CreateIntegerValue(5));
+ list.Append(new base::FundamentalValue(5));
scoped_ptr<Function2::Params> f2_params = Function2::Params::Create(list);
EXPECT_EQ(5, f2_params->x);
base::ListValue list;
scoped_ptr<Function7::Params> f7_params = Function7::Params::Create(list);
EXPECT_EQ(NULL, f7_params->arg.get());
- list.Append(base::Value::CreateIntegerValue(7));
+ list.Append(new base::FundamentalValue(7));
f7_params = Function7::Params::Create(list);
EXPECT_EQ(7, *(f7_params->arg));
// Similar to above, but a function with one required and one optional
// argument.
list.Clear();
- list.Append(base::Value::CreateIntegerValue(8));
+ list.Append(new base::FundamentalValue(8));
scoped_ptr<Function8::Params> f8_params = Function8::Params::Create(list);
EXPECT_EQ(8, f8_params->arg1);
EXPECT_EQ(NULL, f8_params->arg2.get());
- list.Append(base::Value::CreateStringValue("foo"));
+ list.Append(new base::StringValue("foo"));
f8_params = Function8::Params::Create(list);
EXPECT_EQ(8, f8_params->arg1);
EXPECT_EQ("foo", *(f8_params->arg2));
// Tests of a function that takes an integer and an array of integers. First
// use an empty array.
base::ListValue list;
- list.Append(base::Value::CreateIntegerValue(33));
+ list.Append(new base::FundamentalValue(33));
list.Append(new base::ListValue);
scoped_ptr<Function10::Params> f10_params = Function10::Params::Create(list);
ASSERT_TRUE(f10_params != NULL);
// Same function, but this time with 2 values in the array.
list.Clear();
- list.Append(base::Value::CreateIntegerValue(33));
+ list.Append(new base::FundamentalValue(33));
base::ListValue* sublist = new base::ListValue;
- sublist->Append(base::Value::CreateIntegerValue(34));
- sublist->Append(base::Value::CreateIntegerValue(35));
+ sublist->Append(new base::FundamentalValue(34));
+ sublist->Append(new base::FundamentalValue(35));
list.Append(sublist);
f10_params = Function10::Params::Create(list);
ASSERT_TRUE(f10_params != NULL);