Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Unified Diff: core/fxcrt/cfx_weak_ptr_unittest.cpp

Issue 2385303002: Rename CFX_WeakPtr::Clear() to DestroyObject() (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/cfx_weak_ptr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/cfx_weak_ptr_unittest.cpp
diff --git a/core/fxcrt/cfx_weak_ptr_unittest.cpp b/core/fxcrt/cfx_weak_ptr_unittest.cpp
index 11dd8bb3c0d3240fcdea8c8bc9097de5c5037adc..47f63c35b240e6d24ea3c2615bfedb3b795e299b 100644
--- a/core/fxcrt/cfx_weak_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_weak_ptr_unittest.cpp
@@ -121,13 +121,13 @@ TEST(fxcrt, WeakPtrResetNonNull) {
EXPECT_EQ(1, thing2.delete_count());
}
-TEST(fxcrt, WeakPtrClear) {
+TEST(fxcrt, WeakPtrDeleteObject) {
PseudoDeletable thing;
{
UniquePtr unique(&thing);
WeakPtr ptr1(std::move(unique));
WeakPtr ptr2 = ptr1;
- ptr1.Clear();
+ ptr1.DeleteObject();
EXPECT_FALSE(ptr1);
EXPECT_EQ(nullptr, ptr1.Get());
EXPECT_FALSE(ptr2);
@@ -155,7 +155,7 @@ TEST(fxcrt, WeakPtrCyclic) {
EXPECT_EQ(0, thing2.delete_count());
}
-TEST(fxcrt, WeakPtrCyclicClear) {
+TEST(fxcrt, WeakPtrCyclicDeleteObject) {
PseudoDeletable thing1;
PseudoDeletable thing2;
{
@@ -165,7 +165,7 @@ TEST(fxcrt, WeakPtrCyclicClear) {
WeakPtr ptr2(std::move(unique2));
ptr1->SetNext(ptr2);
ptr2->SetNext(ptr1);
- ptr1.Clear();
+ ptr1.DeleteObject();
EXPECT_EQ(1, thing1.delete_count());
EXPECT_EQ(0, thing2.delete_count());
}
« no previous file with comments | « core/fxcrt/cfx_weak_ptr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698