summaryrefslogtreecommitdiffstats
path: root/chrome/common/json_value_serializer_unittest.cc
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-05-31 20:30:28 +0100
committerKristian Monsen <kristianm@google.com>2011-06-14 20:31:41 -0700
commit72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 (patch)
tree382278a54ce7a744d62fa510a9a80688cc12434b /chrome/common/json_value_serializer_unittest.cc
parentc4becdd46e31d261b930e4b5a539cbc1d45c23a6 (diff)
downloadexternal_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.zip
external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.gz
external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.bz2
Merge Chromium.org at r11.0.672.0: Initial merge by git.
Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192
Diffstat (limited to 'chrome/common/json_value_serializer_unittest.cc')
-rw-r--r--chrome/common/json_value_serializer_unittest.cc12
1 files changed, 6 insertions, 6 deletions
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<Value> 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);