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

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

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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 <string> 5 #include <string>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/renderer/media/media_stream_extra_data.h" 9 #include "content/renderer/media/media_stream_extra_data.h"
10 #include "content/renderer/media/mock_media_stream_dependency_factory.h" 10 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 WebKit::WebMediaStreamSource::TypeAudio, 85 WebKit::WebMediaStreamSource::TypeAudio,
86 WebKit::WebString::fromUTF8("audio_track")); 86 WebKit::WebString::fromUTF8("audio_track"));
87 WebKit::WebVector<WebKit::WebMediaStreamSource> video_sources( 87 WebKit::WebVector<WebKit::WebMediaStreamSource> video_sources(
88 static_cast<size_t>(1)); 88 static_cast<size_t>(1));
89 video_sources[0].initialize(WebKit::WebString::fromUTF8(video_track_label), 89 video_sources[0].initialize(WebKit::WebString::fromUTF8(video_track_label),
90 WebKit::WebMediaStreamSource::TypeVideo, 90 WebKit::WebMediaStreamSource::TypeVideo,
91 WebKit::WebString::fromUTF8("video_track")); 91 WebKit::WebString::fromUTF8("video_track"));
92 WebKit::WebMediaStreamDescriptor local_stream; 92 WebKit::WebMediaStreamDescriptor local_stream;
93 local_stream.initialize(UTF8ToUTF16(stream_label), audio_sources, 93 local_stream.initialize(UTF8ToUTF16(stream_label), audio_sources,
94 video_sources); 94 video_sources);
95 local_stream.setExtraData(new MediaStreamExtraData(native_stream)); 95 local_stream.setExtraData(new content::MediaStreamExtraData(native_stream));
96 return local_stream; 96 return local_stream;
97 } 97 }
98 98
99 // Creates a remote MediaStream and adds it to the mocked native 99 // Creates a remote MediaStream and adds it to the mocked native
100 // peer connection. 100 // peer connection.
101 scoped_refptr<webrtc::MediaStreamInterface> 101 scoped_refptr<webrtc::MediaStreamInterface>
102 AddRemoteMockMediaStream(const std::string& stream_label, 102 AddRemoteMockMediaStream(const std::string& stream_label,
103 const std::string& video_track_label, 103 const std::string& video_track_label,
104 const std::string& audio_track_label) { 104 const std::string& audio_track_label) {
105 // We use a local stream as a remote since for testing purposes we really 105 // We use a local stream as a remote since for testing purposes we really
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 EXPECT_EQ("", mock_client_->candidate_mid()); 305 EXPECT_EQ("", mock_client_->candidate_mid());
306 EXPECT_EQ(-1, mock_client_->candidate_mlineindex()); 306 EXPECT_EQ(-1, mock_client_->candidate_mlineindex());
307 EXPECT_EQ("", mock_client_->candidate_sdp()); 307 EXPECT_EQ("", mock_client_->candidate_sdp());
308 } 308 }
309 309
310 TEST_F(RTCPeerConnectionHandlerTest, OnRenegotiationNeeded) { 310 TEST_F(RTCPeerConnectionHandlerTest, OnRenegotiationNeeded) {
311 EXPECT_FALSE(mock_client_->renegotiate()); 311 EXPECT_FALSE(mock_client_->renegotiate());
312 pc_handler_->OnRenegotiationNeeded(); 312 pc_handler_->OnRenegotiationNeeded();
313 EXPECT_TRUE(mock_client_->renegotiate()); 313 EXPECT_TRUE(mock_client_->renegotiate());
314 } 314 }
OLDNEW
« no previous file with comments | « content/renderer/media/render_media_log.cc ('k') | content/renderer/media/webrtc_audio_device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698