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/WebRTCConfiguration.h" | |
6 #include "public/platform/WebRTCError.h" | 7 #include "public/platform/WebRTCError.h" |
7 #include "public/platform/WebRTCPeerConnectionHandler.h" | 8 #include "public/platform/WebRTCPeerConnectionHandler.h" |
8 #include "public/platform/WebRTCSessionDescription.h" | 9 #include "public/platform/WebRTCSessionDescription.h" |
9 #include "public/web/WebScriptSource.h" | 10 #include "public/web/WebScriptSource.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.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" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 const WebRTCSessionDescription&) override {} | 66 const WebRTCSessionDescription&) override {} |
66 WebRTCSessionDescription localDescription() override { | 67 WebRTCSessionDescription localDescription() override { |
67 return WebRTCSessionDescription(); | 68 return WebRTCSessionDescription(); |
68 } | 69 } |
69 WebRTCSessionDescription remoteDescription() override { | 70 WebRTCSessionDescription remoteDescription() override { |
70 return WebRTCSessionDescription(); | 71 return WebRTCSessionDescription(); |
71 } | 72 } |
72 WebRTCErrorType setConfiguration(const WebRTCConfiguration&) override { | 73 WebRTCErrorType setConfiguration(const WebRTCConfiguration&) override { |
73 return WebRTCErrorType::kNone; | 74 return WebRTCErrorType::kNone; |
74 } | 75 } |
76 blink::WebRTCConfiguration getConfiguration() override { | |
77 blink::WebRTCConfiguration config; | |
78 return config; | |
dcheng
2017/03/09 21:36:54
Nit: return blink::WebRTCConfiguration()
zhihuang1
2017/03/10 03:20:43
Done.
| |
79 } | |
75 bool addStream(const WebMediaStream&, const WebMediaConstraints&) override { | 80 bool addStream(const WebMediaStream&, const WebMediaConstraints&) override { |
76 return true; | 81 return true; |
77 } | 82 } |
78 void removeStream(const WebMediaStream&) override {} | 83 void removeStream(const WebMediaStream&) override {} |
79 void getStats(const WebRTCStatsRequest&) override {} | 84 void getStats(const WebRTCStatsRequest&) override {} |
80 void getStats(std::unique_ptr<WebRTCStatsReportCallback>) override {} | 85 void getStats(std::unique_ptr<WebRTCStatsReportCallback>) override {} |
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; |
(...skipping 30 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 |