Index: base/memory/weak_ptr_unittest.cc |
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc |
index be28e526e1cf22c1083ea8acf639213e7e97444e..8f42664ee244a486b433b70837d2722d477a87ec 100644 |
--- a/base/memory/weak_ptr_unittest.cc |
+++ b/base/memory/weak_ptr_unittest.cc |
@@ -34,7 +34,7 @@ class OffThreadObjectCreator { |
} |
}; |
-struct Base {}; |
+struct Base { std::string member; }; |
struct Derived : Base {}; |
struct Producer : SupportsWeakPtr<Producer> {}; |
@@ -337,10 +337,12 @@ TEST(WeakPtrTest, OwnerThreadDeletesObject) { |
TEST(WeakPtrTest, Dereference) { |
Base data; |
+ data.member = "123456"; |
WeakPtrFactory<Base> factory(&data); |
WeakPtr<Base> ptr = factory.GetWeakPtr(); |
EXPECT_EQ(&data, ptr.get()); |
- EXPECT_EQ(&data, *ptr); |
+ EXPECT_EQ(data.member, (*ptr).member); |
+ EXPECT_EQ(data.member, ptr->member); |
} |
} // namespace base |