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

Side by Side Diff: media/cast/video_sender/external_video_encoder_unittest.cc

Issue 134943002: Fix memory leak in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/cast/video_sender/video_sender_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 task_runner_->RunTasks(); 123 task_runner_->RunTasks();
124 124
125 for (int i = 0; i < 6; ++i) { 125 for (int i = 0; i < 6; ++i) {
126 capture_time += base::TimeDelta::FromMilliseconds(33); 126 capture_time += base::TimeDelta::FromMilliseconds(33);
127 test_video_encoder_callback_->SetExpectedResult(false, i + 1, i, 127 test_video_encoder_callback_->SetExpectedResult(false, i + 1, i,
128 capture_time); 128 capture_time);
129 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(video_frame_, capture_time, 129 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(video_frame_, capture_time,
130 frame_encoded_callback)); 130 frame_encoded_callback));
131 task_runner_->RunTasks(); 131 task_runner_->RunTasks();
132 } 132 }
133 // We need to run the task to cleanup the GPU instance.
134 video_encoder_.reset(NULL);
135 task_runner_->RunTasks();
133 } 136 }
134 137
135 } // namespace cast 138 } // namespace cast
136 } // namespace media 139 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/cast/video_sender/video_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698