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

Unified Diff: base/scoped_comptr_win_unittest.cc

Issue 40256: Pulling in operator=() to ScopedComPtr. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « base/scoped_comptr_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/scoped_comptr_win_unittest.cc
===================================================================
--- base/scoped_comptr_win_unittest.cc (revision 11150)
+++ base/scoped_comptr_win_unittest.cc (working copy)
@@ -29,6 +29,11 @@
EXPECT_TRUE(copy1.IsSameObject(mem_alloc));
EXPECT_FALSE(copy1.IsSameObject(unk2)); // unk2 is valid but different
EXPECT_FALSE(copy1.IsSameObject(unk)); // unk is NULL
+
+ IMalloc* naked_copy = copy1.Detach();
+ copy1 = naked_copy; // Test the =(T*) operator.
+ naked_copy->Release();
+
copy1.Release();
EXPECT_FALSE(copy1.IsSameObject(unk2)); // unk2 is valid, copy1 is not
« no previous file with comments | « base/scoped_comptr_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698