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

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

Issue 11828060: Roll libjingle 257:260. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 EXPECT_EQ(0u, mock_peer_connection_->local_streams()->count()); 358 EXPECT_EQ(0u, mock_peer_connection_->local_streams()->count());
359 359
360 scoped_refptr<MockRTCStatsRequest> request( 360 scoped_refptr<MockRTCStatsRequest> request(
361 new talk_base::RefCountedObject<MockRTCStatsRequest>()); 361 new talk_base::RefCountedObject<MockRTCStatsRequest>());
362 request->setSelector(local_stream, component); 362 request->setSelector(local_stream, component);
363 pc_handler_->getStats(request.get()); 363 pc_handler_->getStats(request.get());
364 EXPECT_EQ(0, request->result()->report_count()); 364 EXPECT_EQ(0, request->result()->report_count());
365 } 365 }
366 366
367 TEST_F(RTCPeerConnectionHandlerTest, OnStateChange) { 367 TEST_F(RTCPeerConnectionHandlerTest, OnStateChange) {
368 // Ready states. 368 // Signaling states.
369 webrtc::PeerConnectionObserver::StateType state = 369 webrtc::PeerConnectionObserver::StateType state =
370 webrtc::PeerConnectionObserver::kReadyState; 370 webrtc::PeerConnectionObserver::kSignalingState;
371 mock_peer_connection_->SetReadyState( 371 mock_peer_connection_->SetReadyState(
372 webrtc::PeerConnectionInterface::kHaveRemoteOffer); 372 webrtc::PeerConnectionInterface::kHaveRemoteOffer);
373 pc_handler_->OnStateChange(state); 373 pc_handler_->OnStateChange(state);
374 EXPECT_EQ(WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateOpening, 374 EXPECT_EQ(WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateOpening,
375 mock_client_->ready_state()); 375 mock_client_->ready_state());
376 mock_peer_connection_->SetReadyState( 376 mock_peer_connection_->SetReadyState(
377 webrtc::PeerConnectionInterface::kActive); 377 webrtc::PeerConnectionInterface::kActive);
378 pc_handler_->OnStateChange(state); 378 pc_handler_->OnStateChange(state);
379 EXPECT_EQ(WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateActive, 379 EXPECT_EQ(WebKit::WebRTCPeerConnectionHandlerClient::ReadyStateActive,
380 mock_client_->ready_state()); 380 mock_client_->ready_state());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 switches::kEnableDataChannels); 459 switches::kEnableDataChannels);
460 460
461 WebKit::WebString label = "d1"; 461 WebKit::WebString label = "d1";
462 scoped_ptr<WebKit::WebRTCDataChannelHandler> channel( 462 scoped_ptr<WebKit::WebRTCDataChannelHandler> channel(
463 pc_handler_->createDataChannel("d1", true)); 463 pc_handler_->createDataChannel("d1", true));
464 EXPECT_TRUE(channel.get() != NULL); 464 EXPECT_TRUE(channel.get() != NULL);
465 EXPECT_EQ(label, channel->label()); 465 EXPECT_EQ(label, channel->label());
466 } 466 }
467 467
468 } // namespace content 468 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | content/renderer/media/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698