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

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

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/child/child_process.h" 8 #include "content/child/child_process.h"
9 #include "content/renderer/media/media_stream.h" 9 #include "content/renderer/media/media_stream.h"
10 #include "content/renderer/media/media_stream_track.h" 10 #include "content/renderer/media/media_stream_track.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 content::MediaStreamRequestResult result_; 153 content::MediaStreamRequestResult result_;
154 blink::WebString result_name_; 154 blink::WebString result_name_;
155 blink::WebVector<blink::WebMediaDeviceInfo> last_devices_; 155 blink::WebVector<blink::WebMediaDeviceInfo> last_devices_;
156 blink::WebVector<blink::WebSourceInfo> last_sources_; 156 blink::WebVector<blink::WebSourceInfo> last_sources_;
157 PeerConnectionDependencyFactory* factory_; 157 PeerConnectionDependencyFactory* factory_;
158 MockMediaStreamVideoCapturerSource* video_source_; 158 MockMediaStreamVideoCapturerSource* video_source_;
159 }; 159 };
160 160
161 class UserMediaClientImplTest : public ::testing::Test { 161 class UserMediaClientImplTest : public ::testing::Test {
162 public: 162 public:
163 virtual void SetUp() { 163 void SetUp() override {
164 // Create our test object. 164 // Create our test object.
165 child_process_.reset(new ChildProcess()); 165 child_process_.reset(new ChildProcess());
166 dependency_factory_.reset(new MockPeerConnectionDependencyFactory()); 166 dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
167 ms_dispatcher_ = new MockMediaStreamDispatcher(); 167 ms_dispatcher_ = new MockMediaStreamDispatcher();
168 used_media_impl_.reset(new UserMediaClientImplUnderTest( 168 used_media_impl_.reset(new UserMediaClientImplUnderTest(
169 dependency_factory_.get(), 169 dependency_factory_.get(),
170 scoped_ptr<MediaStreamDispatcher>(ms_dispatcher_).Pass())); 170 scoped_ptr<MediaStreamDispatcher>(ms_dispatcher_).Pass()));
171 } 171 }
172 172
173 virtual void TearDown() override { 173 void TearDown() override {
174 used_media_impl_.reset(); 174 used_media_impl_.reset();
175 blink::WebHeap::collectAllGarbageForTesting(); 175 blink::WebHeap::collectAllGarbageForTesting();
176 } 176 }
177 177
178 blink::WebMediaStream RequestLocalMediaStream() { 178 blink::WebMediaStream RequestLocalMediaStream() {
179 used_media_impl_->RequestUserMedia(); 179 used_media_impl_->RequestUserMedia();
180 FakeMediaStreamDispatcherRequestUserMediaComplete(); 180 FakeMediaStreamDispatcherRequestUserMediaComplete();
181 StartMockedVideoSource(); 181 StartMockedVideoSource();
182 182
183 EXPECT_EQ(UserMediaClientImplUnderTest::REQUEST_SUCCEEDED, 183 EXPECT_EQ(UserMediaClientImplUnderTest::REQUEST_SUCCEEDED,
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 // Video input device environment facing. 572 // Video input device environment facing.
573 source = &used_media_impl_->last_sources()[3]; 573 source = &used_media_impl_->last_sources()[3];
574 EXPECT_FALSE(source->id().isEmpty()); 574 EXPECT_FALSE(source->id().isEmpty());
575 EXPECT_EQ(blink::WebSourceInfo::SourceKindVideo, source->kind()); 575 EXPECT_EQ(blink::WebSourceInfo::SourceKindVideo, source->kind());
576 EXPECT_FALSE(source->label().isEmpty()); 576 EXPECT_FALSE(source->label().isEmpty());
577 EXPECT_EQ(blink::WebSourceInfo::VideoFacingModeEnvironment, source->facing()); 577 EXPECT_EQ(blink::WebSourceInfo::VideoFacingModeEnvironment, source->facing());
578 } 578 }
579 579
580 } // namespace content 580 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_decoder_unittest.cc ('k') | content/renderer/media/video_source_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698