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

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

Issue 2808783002: Unflag RTCRtpReceiver. (Closed)
Patch Set: global-interface-listing-expected.txt on mac too 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" 6 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
7 #include "content/public/common/content_switches.h" 7 #include "content/public/common/content_switches.h"
8 #include "media/base/media_switches.h" 8 #include "media/base/media_switches.h"
9 9
10 static const char kMainWebrtcTestHtmlPage[] = "/webrtc/webrtc_jsep01_test.html"; 10 static const char kMainWebrtcTestHtmlPage[] = "/webrtc/webrtc_jsep01_test.html";
11 11
12 class WebRtcRtpBrowserTest : public WebRtcTestBase { 12 class WebRtcRtpBrowserTest : public WebRtcTestBase {
13 public: 13 public:
14 WebRtcRtpBrowserTest() : left_tab_(nullptr), right_tab_(nullptr) {} 14 WebRtcRtpBrowserTest() : left_tab_(nullptr), right_tab_(nullptr) {}
15 15
16 void SetUpInProcessBrowserTestFixture() override { 16 void SetUpInProcessBrowserTestFixture() override {
17 DetectErrorsInJavaScript(); 17 DetectErrorsInJavaScript();
18 } 18 }
19 19
20 void SetUpCommandLine(base::CommandLine* command_line) override { 20 void SetUpCommandLine(base::CommandLine* command_line) override {
21 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 21 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
22
23 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures,
24 "RTCRtpReceiver");
25 } 22 }
26 23
27 protected: 24 protected:
28 void StartServerAndOpenTabs() { 25 void StartServerAndOpenTabs() {
29 ASSERT_TRUE(embedded_test_server()->Start()); 26 ASSERT_TRUE(embedded_test_server()->Start());
30 left_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 27 left_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
31 right_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 28 right_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
32 } 29 }
33 30
34 content::WebContents* left_tab_; 31 content::WebContents* left_tab_;
35 content::WebContents* right_tab_; 32 content::WebContents* right_tab_;
36 }; 33 };
37 34
38 IN_PROC_BROWSER_TEST_F(WebRtcRtpBrowserTest, GetReceivers) { 35 IN_PROC_BROWSER_TEST_F(WebRtcRtpBrowserTest, GetReceivers) {
39 StartServerAndOpenTabs(); 36 StartServerAndOpenTabs();
40 37
41 SetupPeerconnectionWithoutLocalStream(left_tab_); 38 SetupPeerconnectionWithoutLocalStream(left_tab_);
42 CreateAndAddStreams(left_tab_, 3); 39 CreateAndAddStreams(left_tab_, 3);
43 40
44 SetupPeerconnectionWithoutLocalStream(right_tab_); 41 SetupPeerconnectionWithoutLocalStream(right_tab_);
45 CreateAndAddStreams(right_tab_, 1); 42 CreateAndAddStreams(right_tab_, 1);
46 43
47 NegotiateCall(left_tab_, right_tab_); 44 NegotiateCall(left_tab_, right_tab_);
48 45
49 VerifyRtpReceivers(left_tab_, 2); 46 VerifyRtpReceivers(left_tab_, 2);
50 VerifyRtpReceivers(right_tab_, 6); 47 VerifyRtpReceivers(right_tab_, 6);
51 } 48 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698