diff options
author | Luis Hector Chavez <lhchavez@google.com> | 2016-06-01 20:11:15 +0000 |
---|---|---|
committer | Luis Hector Chavez <lhchavez@google.com> | 2016-06-01 21:48:37 +0000 |
commit | 83db8f75afbb37010450a6a5607764dedf20db6b (patch) | |
tree | a125cec814362b362eefa3b70bec5eef746400b9 /third_party/chromium/base/json/json_reader_unittest.cc | |
parent | abfe7a063bbaebdca8703d27137c8c9aed826dac (diff) | |
download | libweave-83db8f75afbb37010450a6a5607764dedf20db6b.tar.gz |
Reland "Merge remote-tracking branch 'weave/master' into 'weave/aosp-master'"
This reverts commit abfe7a063bbaebdca8703d27137c8c9aed826dac.
All necessary changes are ready in AOSP for this to land.
Change-Id: I9ac99ebbb292e047e6d6a7978e5748987d7f0f9d
Reviewed-on: https://weave-review.googlesource.com/3720
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
Diffstat (limited to 'third_party/chromium/base/json/json_reader_unittest.cc')
-rw-r--r-- | third_party/chromium/base/json/json_reader_unittest.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/third_party/chromium/base/json/json_reader_unittest.cc b/third_party/chromium/base/json/json_reader_unittest.cc index 2bfd10e..b1ad46e 100644 --- a/third_party/chromium/base/json/json_reader_unittest.cc +++ b/third_party/chromium/base/json/json_reader_unittest.cc @@ -7,10 +7,10 @@ #include <stddef.h> #include <gtest/gtest.h> +#include <memory> #include "base/logging.h" #include "base/macros.h" -#include "base/memory/scoped_ptr.h" #include "base/strings/string_piece.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/values.h" @@ -20,7 +20,7 @@ namespace base { TEST(JSONReaderTest, Reading) { // some whitespace checking - scoped_ptr<Value> root = JSONReader().ReadToValue(" null "); + std::unique_ptr<Value> root = JSONReader().ReadToValue(" null "); ASSERT_TRUE(root.get()); EXPECT_TRUE(root->IsType(Value::TYPE_NULL)); @@ -249,7 +249,7 @@ TEST(JSONReaderTest, Reading) { EXPECT_EQ(3U, list->GetSize()); // Test with trailing comma. Should be parsed the same as above. - scoped_ptr<Value> root2 = + std::unique_ptr<Value> root2 = JSONReader::Read("[true, false, null, ]", JSON_ALLOW_TRAILING_COMMAS); EXPECT_TRUE(root->Equals(root2.get())); @@ -543,15 +543,15 @@ TEST(JSONReaderTest, Reading) { // Tests that the root of a JSON object can be deleted safely while its // children outlive it. TEST(JSONReaderTest, StringOptimizations) { - scoped_ptr<Value> dict_literal_0; - scoped_ptr<Value> dict_literal_1; - scoped_ptr<Value> dict_string_0; - scoped_ptr<Value> dict_string_1; - scoped_ptr<Value> list_value_0; - scoped_ptr<Value> list_value_1; + std::unique_ptr<Value> dict_literal_0; + std::unique_ptr<Value> dict_literal_1; + std::unique_ptr<Value> dict_string_0; + std::unique_ptr<Value> dict_string_1; + std::unique_ptr<Value> list_value_0; + std::unique_ptr<Value> list_value_1; { - scoped_ptr<Value> root = JSONReader::Read( + std::unique_ptr<Value> root = JSONReader::Read( "{" " \"test\": {" " \"foo\": true," |