From 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Tue, 31 May 2011 20:30:28 +0100 Subject: Merge Chromium.org at r11.0.672.0: Initial merge by git. Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192 --- chrome/common/json_value_serializer_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/common/json_value_serializer_unittest.cc') diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc index b3f3e0d..c52aa06 100644 --- a/chrome/common/json_value_serializer_unittest.cc +++ b/chrome/common/json_value_serializer_unittest.cc @@ -17,7 +17,7 @@ TEST(JSONValueSerializerTest, Roundtrip) { const std::string original_serialization = - "{\"bool\":true,\"int\":42,\"list\":[1,2],\"null\":null,\"real\":3.14}"; + "{\"bool\":true,\"double\":3.14,\"int\":42,\"list\":[1,2],\"null\":null}"; JSONStringValueSerializer serializer(original_serialization); scoped_ptr root(serializer.Deserialize(NULL, NULL)); ASSERT_TRUE(root.get()); @@ -38,9 +38,9 @@ TEST(JSONValueSerializerTest, Roundtrip) { ASSERT_TRUE(root_dict->GetInteger("int", &int_value)); ASSERT_EQ(42, int_value); - double real_value = 0.0; - ASSERT_TRUE(root_dict->GetReal("real", &real_value)); - ASSERT_DOUBLE_EQ(3.14, real_value); + double double_value = 0.0; + ASSERT_TRUE(root_dict->GetDouble("double", &double_value)); + ASSERT_DOUBLE_EQ(3.14, double_value); // We shouldn't be able to write using this serializer, since it was // initialized with a const string. @@ -63,10 +63,10 @@ TEST(JSONValueSerializerTest, Roundtrip) { const std::string pretty_serialization = "{" JSON_NEWLINE " \"bool\": true," JSON_NEWLINE + " \"double\": 3.14," JSON_NEWLINE " \"int\": 42," JSON_NEWLINE " \"list\": [ 1, 2 ]," JSON_NEWLINE - " \"null\": null," JSON_NEWLINE - " \"real\": 3.14" JSON_NEWLINE + " \"null\": null" JSON_NEWLINE "}" JSON_NEWLINE; #undef JSON_NEWLINE ASSERT_EQ(pretty_serialization, test_serialization); -- cgit v1.1