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

Side by Side Diff: chrome/browser/media/webrtc/webrtc_browsertest_base.cc

Issue 2759953003: Interface RTCRtpReceiver and RTCPeerConnection.getReceivers() added. (Closed)
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/media/webrtc/webrtc_browsertest_base.h" 5 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 void WebRtcTestBase::SetDefaultVideoCodec( 552 void WebRtcTestBase::SetDefaultVideoCodec(
553 content::WebContents* tab, 553 content::WebContents* tab,
554 const std::string& video_codec) const { 554 const std::string& video_codec) const {
555 EXPECT_EQ("ok", ExecuteJavascript( 555 EXPECT_EQ("ok", ExecuteJavascript(
556 "setDefaultVideoCodec('" + video_codec + "')", tab)); 556 "setDefaultVideoCodec('" + video_codec + "')", tab));
557 } 557 }
558 558
559 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const { 559 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const {
560 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab)); 560 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab));
561 } 561 }
562
563 void WebRtcTestBase::CreateAndAddStreams(content::WebContents* tab,
564 size_t count) const {
565 EXPECT_EQ(
566 "ok-streams-created-and-added",
567 ExecuteJavascript(
568 "createAndAddStreams(" + base::SizeTToString(count) + ")", tab));
569 }
570
571 void WebRtcTestBase::VerifyRtpReceivers(
572 content::WebContents* tab,
573 base::Optional<size_t> expected_num_tracks) const {
574 std::string javascript =
575 expected_num_tracks ? "verifyRtpReceivers(" +
576 base::SizeTToString(*expected_num_tracks) + ")"
577 : "verifyRtpReceivers()";
578 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab));
579 }
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_browsertest_base.h ('k') | chrome/browser/media/webrtc/webrtc_rtp_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698