diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-16 18:31:10 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-16 18:31:10 +0000 |
commit | c4d9d29b50b194d67f2a5eaf5a9b07637b4d611f (patch) | |
tree | 530f096da5535c2012d0176a72cd8e1ddd32f814 /remoting/host/ipc_desktop_environment_unittest.cc | |
parent | fce220fed6aa1e7a788f4e4273c620e8fe8f472e (diff) | |
download | chromium_src-c4d9d29b50b194d67f2a5eaf5a9b07637b4d611f.zip chromium_src-c4d9d29b50b194d67f2a5eaf5a9b07637b4d611f.tar.gz chromium_src-c4d9d29b50b194d67f2a5eaf5a9b07637b4d611f.tar.bz2 |
Fix memory leak in IpcDesktopEnvironmentTest.CaptureFrame
The leak was introduced in r200504.
R=alexeypa@chromium.org
Review URL: https://codereview.chromium.org/15070010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/ipc_desktop_environment_unittest.cc')
-rw-r--r-- | remoting/host/ipc_desktop_environment_unittest.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc index 4e54b1d..e2138d2 100644 --- a/remoting/host/ipc_desktop_environment_unittest.cc +++ b/remoting/host/ipc_desktop_environment_unittest.cc @@ -39,6 +39,8 @@ using testing::_; using testing::AnyNumber; using testing::AtLeast; using testing::AtMost; +using testing::DeleteArg; +using testing::DoAll; using testing::Return; using testing::ReturnRef; @@ -457,8 +459,10 @@ TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) { // Stop the test when the first frame is captured. EXPECT_CALL(screen_capturer_callback_, OnCaptureCompleted(_)) - .WillOnce(InvokeWithoutArgs( - this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); + .WillOnce(DoAll( + DeleteArg<0>(), + InvokeWithoutArgs( + this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment))); // Capture a single frame. video_capturer_->Capture(webrtc::DesktopRegion()); |