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

Side by Side Diff: content/renderer/media/capture_video_decoder_unittest.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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
« no previous file with comments | « content/common/url_fetcher_unittest.cc ('k') | content/renderer/media/render_media_log.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "content/renderer/media/capture_video_decoder.h" 6 #include "content/renderer/media/capture_video_decoder.h"
7 #include "content/renderer/media/video_capture_impl.h" 7 #include "content/renderer/media/video_capture_impl.h"
8 #include "content/renderer/media/video_capture_impl_manager.h" 8 #include "content/renderer/media/video_capture_impl_manager.h"
9 #include "media/base/filters.h" 9 #include "media/base/filters.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 private: 81 private:
82 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImplManager); 82 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImplManager);
83 }; 83 };
84 84
85 class CaptureVideoDecoderTest : public ::testing::Test { 85 class CaptureVideoDecoderTest : public ::testing::Test {
86 protected: 86 protected:
87 CaptureVideoDecoderTest() { 87 CaptureVideoDecoderTest() {
88 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO)); 88 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
89 message_loop_proxy_ = 89 message_loop_proxy_ =
90 base::MessageLoopProxy::CreateForCurrentThread().get(); 90 base::MessageLoopProxy::current().get();
91 vc_manager_ = new MockVideoCaptureImplManager(); 91 vc_manager_ = new MockVideoCaptureImplManager();
92 media::VideoCapture::VideoCaptureCapability capability; 92 media::VideoCapture::VideoCaptureCapability capability;
93 capability.width = 176; 93 capability.width = 176;
94 capability.height = 144; 94 capability.height = 144;
95 capability.max_fps = 30; 95 capability.max_fps = 30;
96 capability.expected_capture_delay = 0; 96 capability.expected_capture_delay = 0;
97 capability.raw_type = media::VideoFrame::I420; 97 capability.raw_type = media::VideoFrame::I420;
98 capability.interlaced = false; 98 capability.interlaced = false;
99 capability.resolution_fixed = false; 99 capability.resolution_fixed = false;
100 100
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 message_loop_->RunAllPending(); 163 message_loop_->RunAllPending();
164 164
165 EXPECT_CALL(*vc_impl, StopCapture(capture_client)) 165 EXPECT_CALL(*vc_impl, StopCapture(capture_client))
166 .Times(1) 166 .Times(1)
167 .WillOnce(CaptureStopped(capture_client, vc_impl.get())); 167 .WillOnce(CaptureStopped(capture_client, vc_impl.get()));
168 EXPECT_CALL(*vc_manager_, RemoveDevice(_, _)) 168 EXPECT_CALL(*vc_manager_, RemoveDevice(_, _))
169 .WillOnce(Return()); 169 .WillOnce(Return());
170 decoder_->Stop(media::NewExpectedCallback()); 170 decoder_->Stop(media::NewExpectedCallback());
171 message_loop_->RunAllPending(); 171 message_loop_->RunAllPending();
172 } 172 }
OLDNEW
« no previous file with comments | « content/common/url_fetcher_unittest.cc ('k') | content/renderer/media/render_media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698