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

Unified Diff: content/common/common_param_traits_unittest.cc

Issue 12207089: Cleanup: Remove deprecated base::Value methods from contents. Use base::Value too. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « content/browser/webui/web_ui_message_handler_unittest.cc ('k') | content/common/font_list_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/common_param_traits_unittest.cc
===================================================================
--- content/common/common_param_traits_unittest.cc (revision 181443)
+++ content/common/common_param_traits_unittest.cc (working copy)
@@ -78,7 +78,6 @@
EXPECT_TRUE(IPC::ParamTraits<TestPair>::Read(&msg, &iter, &output));
EXPECT_EQ(output.first, "foo");
EXPECT_EQ(output.second, "bar");
-
}
// Tests bitmap serialization.
@@ -124,15 +123,15 @@
}
TEST(IPCMessageTest, ListValue) {
- ListValue input;
- input.Set(0, Value::CreateDoubleValue(42.42));
- input.Set(1, Value::CreateStringValue("forty"));
- input.Set(2, Value::CreateNullValue());
+ base::ListValue input;
+ input.Set(0, new base::FundamentalValue(42.42));
+ input.Set(1, new base::StringValue("forty"));
+ input.Set(2, base::Value::CreateNullValue());
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::WriteParam(&msg, input);
- ListValue output;
+ base::ListValue output;
PickleIterator iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
@@ -146,19 +145,19 @@
}
TEST(IPCMessageTest, DictionaryValue) {
- DictionaryValue input;
- input.Set("null", Value::CreateNullValue());
- input.Set("bool", Value::CreateBooleanValue(true));
- input.Set("int", Value::CreateIntegerValue(42));
+ base::DictionaryValue input;
+ input.Set("null", base::Value::CreateNullValue());
+ input.Set("bool", new base::FundamentalValue(true));
+ input.Set("int", new base::FundamentalValue(42));
- scoped_ptr<DictionaryValue> subdict(new DictionaryValue());
- subdict->Set("str", Value::CreateStringValue("forty two"));
- subdict->Set("bool", Value::CreateBooleanValue(false));
+ scoped_ptr<base::DictionaryValue> subdict(new base::DictionaryValue());
+ subdict->Set("str", new base::StringValue("forty two"));
+ subdict->Set("bool", new base::FundamentalValue(false));
- scoped_ptr<ListValue> sublist(new ListValue());
- sublist->Set(0, Value::CreateDoubleValue(42.42));
- sublist->Set(1, Value::CreateStringValue("forty"));
- sublist->Set(2, Value::CreateStringValue("two"));
+ scoped_ptr<base::ListValue> sublist(new base::ListValue());
+ sublist->Set(0, new base::FundamentalValue(42.42));
+ sublist->Set(1, new base::StringValue("forty"));
+ sublist->Set(2, new base::StringValue("two"));
subdict->Set("list", sublist.release());
input.Set("dict", subdict.release());
@@ -166,7 +165,7 @@
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::WriteParam(&msg, input);
- DictionaryValue output;
+ base::DictionaryValue output;
PickleIterator iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
« no previous file with comments | « content/browser/webui/web_ui_message_handler_unittest.cc ('k') | content/common/font_list_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698