summaryrefslogtreecommitdiffstats
path: root/base/scoped_comptr_win_unittest.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-07 02:54:45 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-07 02:54:45 +0000
commit330436fef8372d1a2498aca063cc5fd88626a977 (patch)
tree059034e4dbbc796bbaec3992c7234f0d73a93556 /base/scoped_comptr_win_unittest.cc
parent8a1c6eb3659da05782b9444ab2db05d90b9b7b93 (diff)
downloadchromium_src-330436fef8372d1a2498aca063cc5fd88626a977.zip
chromium_src-330436fef8372d1a2498aca063cc5fd88626a977.tar.gz
chromium_src-330436fef8372d1a2498aca063cc5fd88626a977.tar.bz2
Pulling in operator=() to ScopedComPtr.
Review URL: http://codereview.chromium.org/40256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/scoped_comptr_win_unittest.cc')
-rw-r--r--base/scoped_comptr_win_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/scoped_comptr_win_unittest.cc b/base/scoped_comptr_win_unittest.cc
index 96ebcc6..5e4ad3d 100644
--- a/base/scoped_comptr_win_unittest.cc
+++ b/base/scoped_comptr_win_unittest.cc
@@ -29,6 +29,11 @@ TEST(ScopedComPtrTest, ScopedComPtr) {
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