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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 10786029: Delete MediaStreamManager in the same way as AudioManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the pyauto test Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // Simulate closing the IPC channel. 242 // Simulate closing the IPC channel.
243 host_->OnChannelClosing(); 243 host_->OnChannelClosing();
244 244
245 // Release the reference to the mock object. The object will be destructed 245 // Release the reference to the mock object. The object will be destructed
246 // on message_loop_. 246 // on message_loop_.
247 host_ = NULL; 247 host_ = NULL;
248 248
249 // We need to continue running message_loop_ to complete all destructions. 249 // We need to continue running message_loop_ to complete all destructions.
250 message_loop_->RunAllPending(); 250 message_loop_->RunAllPending();
251
252 // Delete the IO message loop to delete the device thread,
253 // AudioInputDeviceManager and VideoCaptureManager.
254 message_loop_.reset();
251 } 255 }
252 256
253 void StartCapture() { 257 void StartCapture() {
254 InSequence s; 258 InSequence s;
255 // 1. First - get info about the new resolution 259 // 1. First - get info about the new resolution
256 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId)); 260 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId));
257 261
258 // 2. Change state to started 262 // 2. Change state to started
259 EXPECT_CALL(*host_, OnStateChanged(kDeviceId, 263 EXPECT_CALL(*host_, OnStateChanged(kDeviceId,
260 video_capture::kStarted)); 264 video_capture::kStarted));
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 385 }
382 386
383 #ifdef DUMP_VIDEO 387 #ifdef DUMP_VIDEO
384 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { 388 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) {
385 CaptureAndDumpVideo(640, 480, 30); 389 CaptureAndDumpVideo(640, 480, 30);
386 } 390 }
387 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { 391 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) {
388 CaptureAndDumpVideo(1280, 720, 30); 392 CaptureAndDumpVideo(1280, 720, 30);
389 } 393 }
390 #endif 394 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698