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

Side by Side Diff: third_party/WebKit/Source/web/tests/ActiveConnectionThrottlingTest.cpp

Issue 2749703005: RTCRtpSender with track behind RuntimeEnabled flag (Closed)
Patch Set: Fix win-specific compile error. Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code if governed by a BSD-style license that can be 2 // Use of this source code if governed by a BSD-style license that can be
3 // found in LICENSE file. 3 // found in LICENSE file.
4 4
5 #include "platform/scheduler/renderer/web_view_scheduler.h" 5 #include "platform/scheduler/renderer/web_view_scheduler.h"
6 #include "platform/testing/TestingPlatformSupport.h" 6 #include "platform/testing/TestingPlatformSupport.h"
7 #include "public/platform/WebRTCError.h" 7 #include "public/platform/WebRTCError.h"
8 #include "public/platform/WebRTCPeerConnectionHandler.h" 8 #include "public/platform/WebRTCPeerConnectionHandler.h"
9 #include "public/platform/WebRTCRtpReceiver.h" 9 #include "public/platform/WebRTCRtpReceiver.h"
10 #include "public/platform/WebRTCRtpSender.h"
10 #include "public/platform/WebRTCSessionDescription.h" 11 #include "public/platform/WebRTCSessionDescription.h"
11 #include "public/web/WebScriptSource.h" 12 #include "public/web/WebScriptSource.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "web/WebLocalFrameImpl.h" 14 #include "web/WebLocalFrameImpl.h"
14 #include "web/WebViewImpl.h" 15 #include "web/WebViewImpl.h"
15 #include "web/tests/sim/SimRequest.h" 16 #include "web/tests/sim/SimRequest.h"
16 #include "web/tests/sim/SimTest.h" 17 #include "web/tests/sim/SimTest.h"
17 18
18 using testing::_; 19 using testing::_;
19 20
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 73 }
73 WebRTCErrorType SetConfiguration(const WebRTCConfiguration&) override { 74 WebRTCErrorType SetConfiguration(const WebRTCConfiguration&) override {
74 return WebRTCErrorType::kNone; 75 return WebRTCErrorType::kNone;
75 } 76 }
76 bool AddStream(const WebMediaStream&, const WebMediaConstraints&) override { 77 bool AddStream(const WebMediaStream&, const WebMediaConstraints&) override {
77 return true; 78 return true;
78 } 79 }
79 void RemoveStream(const WebMediaStream&) override {} 80 void RemoveStream(const WebMediaStream&) override {}
80 void GetStats(const WebRTCStatsRequest&) override {} 81 void GetStats(const WebRTCStatsRequest&) override {}
81 void GetStats(std::unique_ptr<WebRTCStatsReportCallback>) override {} 82 void GetStats(std::unique_ptr<WebRTCStatsReportCallback>) override {}
83 blink::WebVector<std::unique_ptr<blink::WebRTCRtpSender>> GetSenders()
84 override {
85 return blink::WebVector<std::unique_ptr<blink::WebRTCRtpSender>>();
86 }
82 blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>> GetReceivers() 87 blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>> GetReceivers()
83 override { 88 override {
84 return blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>>(); 89 return blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>>();
85 } 90 }
86 WebRTCDataChannelHandler* CreateDataChannel( 91 WebRTCDataChannelHandler* CreateDataChannel(
87 const WebString& label, 92 const WebString& label,
88 const WebRTCDataChannelInit&) override { 93 const WebRTCDataChannelInit&) override {
89 return nullptr; 94 return nullptr;
90 } 95 }
91 WebRTCDTMFSenderHandler* CreateDTMFSender( 96 WebRTCDTMFSenderHandler* CreateDTMFSender(
(...skipping 28 matching lines...) Expand all
120 "</script>)"); 125 "</script>)");
121 126
122 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest()); 127 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest());
123 128
124 MainFrame().ExecuteScript(WebString("data_channel.close();")); 129 MainFrame().ExecuteScript(WebString("data_channel.close();"));
125 130
126 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest()); 131 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest());
127 } 132 }
128 133
129 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698