OLD | NEW |
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/testing/TestingPlatformSupport.h" | 5 #include "platform/testing/TestingPlatformSupport.h" |
6 #include "public/platform/WebRTCError.h" | 6 #include "public/platform/WebRTCError.h" |
7 #include "public/platform/WebRTCPeerConnectionHandler.h" | 7 #include "public/platform/WebRTCPeerConnectionHandler.h" |
8 #include "public/platform/WebRTCSessionDescription.h" | 8 #include "public/platform/WebRTCSessionDescription.h" |
9 #include "public/web/WebScriptSource.h" | 9 #include "public/web/WebScriptSource.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/WebKit/public/platform/WebRTCRtpReceiver.h" |
11 #include "third_party/WebKit/public/platform/WebViewScheduler.h" | 12 #include "third_party/WebKit/public/platform/WebViewScheduler.h" |
12 #include "web/WebLocalFrameImpl.h" | 13 #include "web/WebLocalFrameImpl.h" |
13 #include "web/WebViewImpl.h" | 14 #include "web/WebViewImpl.h" |
14 #include "web/tests/sim/SimRequest.h" | 15 #include "web/tests/sim/SimRequest.h" |
15 #include "web/tests/sim/SimTest.h" | 16 #include "web/tests/sim/SimTest.h" |
16 | 17 |
17 using testing::_; | 18 using testing::_; |
18 | 19 |
19 namespace blink { | 20 namespace blink { |
20 | 21 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 72 } |
72 WebRTCErrorType setConfiguration(const WebRTCConfiguration&) override { | 73 WebRTCErrorType setConfiguration(const WebRTCConfiguration&) override { |
73 return WebRTCErrorType::kNone; | 74 return WebRTCErrorType::kNone; |
74 } | 75 } |
75 bool addStream(const WebMediaStream&, const WebMediaConstraints&) override { | 76 bool addStream(const WebMediaStream&, const WebMediaConstraints&) override { |
76 return true; | 77 return true; |
77 } | 78 } |
78 void removeStream(const WebMediaStream&) override {} | 79 void removeStream(const WebMediaStream&) override {} |
79 void getStats(const WebRTCStatsRequest&) override {} | 80 void getStats(const WebRTCStatsRequest&) override {} |
80 void getStats(std::unique_ptr<WebRTCStatsReportCallback>) override {} | 81 void getStats(std::unique_ptr<WebRTCStatsReportCallback>) override {} |
| 82 blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>> getReceivers() |
| 83 override { |
| 84 return blink::WebVector<std::unique_ptr<blink::WebRTCRtpReceiver>>(); |
| 85 } |
81 WebRTCDataChannelHandler* createDataChannel( | 86 WebRTCDataChannelHandler* createDataChannel( |
82 const WebString& label, | 87 const WebString& label, |
83 const WebRTCDataChannelInit&) override { | 88 const WebRTCDataChannelInit&) override { |
84 return nullptr; | 89 return nullptr; |
85 } | 90 } |
86 WebRTCDTMFSenderHandler* createDTMFSender( | 91 WebRTCDTMFSenderHandler* createDTMFSender( |
87 const WebMediaStreamTrack&) override { | 92 const WebMediaStreamTrack&) override { |
88 return nullptr; | 93 return nullptr; |
89 } | 94 } |
90 void stop() override {} | 95 void stop() override {} |
(...skipping 24 matching lines...) Expand all Loading... |
115 "</script>)"); | 120 "</script>)"); |
116 | 121 |
117 EXPECT_TRUE(webView().scheduler()->hasActiveConnectionForTest()); | 122 EXPECT_TRUE(webView().scheduler()->hasActiveConnectionForTest()); |
118 | 123 |
119 mainFrame().executeScript(WebString("data_channel.close();")); | 124 mainFrame().executeScript(WebString("data_channel.close();")); |
120 | 125 |
121 EXPECT_FALSE(webView().scheduler()->hasActiveConnectionForTest()); | 126 EXPECT_FALSE(webView().scheduler()->hasActiveConnectionForTest()); |
122 } | 127 } |
123 | 128 |
124 } // namespace blink | 129 } // namespace blink |
OLD | NEW |