| Index: base/values_unittest.cc
|
| ===================================================================
|
| --- base/values_unittest.cc (revision 19850)
|
| +++ base/values_unittest.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -149,7 +149,7 @@
|
| // This is a Value object that allows us to tell if it's been
|
| // properly deleted by modifying the value of external flag on destruction.
|
| class DeletionTestValue : public Value {
|
| -public:
|
| + public:
|
| DeletionTestValue(bool* deletion_flag) : Value(TYPE_NULL) {
|
| Init(deletion_flag); // Separate function so that we can use ASSERT_*
|
| }
|
| @@ -164,7 +164,7 @@
|
| *deletion_flag_ = true;
|
| }
|
|
|
| -private:
|
| + private:
|
| bool* deletion_flag_;
|
| };
|
|
|
| @@ -312,10 +312,10 @@
|
| original_list->Append(original_list_element_1);
|
| original_dict.Set(L"list", original_list);
|
|
|
| - DictionaryValue* copy_dict =
|
| - static_cast<DictionaryValue*>(original_dict.DeepCopy());
|
| - ASSERT_TRUE(copy_dict);
|
| - ASSERT_NE(copy_dict, &original_dict);
|
| + scoped_ptr<DictionaryValue> copy_dict(
|
| + static_cast<DictionaryValue*>(original_dict.DeepCopy()));
|
| + ASSERT_TRUE(copy_dict.get());
|
| + ASSERT_NE(copy_dict.get(), &original_dict);
|
|
|
| Value* copy_null = NULL;
|
| ASSERT_TRUE(copy_dict->Get(L"null", ©_null));
|
| @@ -408,8 +408,6 @@
|
| int copy_list_element_1_value;
|
| ASSERT_TRUE(copy_list_element_1->GetAsInteger(©_list_element_1_value));
|
| ASSERT_EQ(1, copy_list_element_1_value);
|
| -
|
| - delete copy_dict;
|
| }
|
|
|
| TEST(ValuesTest, Equals) {
|
|
|