OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1659 SessionDescriptionInterface::kAnswer); | 1659 SessionDescriptionInterface::kAnswer); |
1660 EXPECT_TRUE(answer->Initialize(sdp, NULL)); | 1660 EXPECT_TRUE(answer->Initialize(sdp, NULL)); |
1661 cricket::ContentInfo* data_info = | 1661 cricket::ContentInfo* data_info = |
1662 answer->description()->GetContentByName("data"); | 1662 answer->description()->GetContentByName("data"); |
1663 data_info->rejected = true; | 1663 data_info->rejected = true; |
1664 | 1664 |
1665 DoSetRemoteDescription(answer); | 1665 DoSetRemoteDescription(answer); |
1666 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); | 1666 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); |
1667 } | 1667 } |
1668 | 1668 |
1669 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
1670 #if defined(WIN) && defined(_DEBUG) | |
1671 #define MAYBE_ReceiveFireFoxOffer DISABLED_ReceiveFireFoxOffer | |
1672 #else | |
1673 #define MAYBE_ReceiveFireFoxOffer ReceiveFireFoxOffer | |
1674 #endif | |
1669 // Test that we can create a session description from an SDP string from | 1675 // Test that we can create a session description from an SDP string from |
1670 // FireFox, use it as a remote session description, generate an answer and use | 1676 // FireFox, use it as a remote session description, generate an answer and use |
1671 // the answer as a local description. | 1677 // the answer as a local description. |
1672 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { | 1678 TEST_F(PeerConnectionInterfaceTest, MAYBE_ReceiveFireFoxOffer) { |
1673 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | 1679 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
1674 FakeConstraints constraints; | 1680 FakeConstraints constraints; |
1675 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 1681 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
1676 true); | 1682 true); |
1677 CreatePeerConnection(&constraints); | 1683 CreatePeerConnection(&constraints); |
1678 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 1684 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
1679 SessionDescriptionInterface* desc = | 1685 SessionDescriptionInterface* desc = |
1680 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, | 1686 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, |
1681 webrtc::kFireFoxSdpOffer, nullptr); | 1687 webrtc::kFireFoxSdpOffer, nullptr); |
1682 EXPECT_TRUE(DoSetSessionDescription(desc, false)); | 1688 EXPECT_TRUE(DoSetSessionDescription(desc, false)); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2026 CreatePeerConnection(&constraints); | 2032 CreatePeerConnection(&constraints); |
2027 | 2033 |
2028 std::string recvonly_offer = kSdpStringWithStream1; | 2034 std::string recvonly_offer = kSdpStringWithStream1; |
2029 rtc::replace_substrs(kSendrecv, strlen(kSendrecv), kRecvonly, | 2035 rtc::replace_substrs(kSendrecv, strlen(kSendrecv), kRecvonly, |
2030 strlen(kRecvonly), &recvonly_offer); | 2036 strlen(kRecvonly), &recvonly_offer); |
2031 CreateAndSetRemoteOffer(recvonly_offer); | 2037 CreateAndSetRemoteOffer(recvonly_offer); |
2032 | 2038 |
2033 EXPECT_EQ(0u, observer_.remote_streams()->count()); | 2039 EXPECT_EQ(0u, observer_.remote_streams()->count()); |
2034 } | 2040 } |
2035 | 2041 |
2042 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2043 #if defined(WIN) && defined(_DEBUG) | |
2044 #define MAYBE_SdpWithoutMsidCreatesDefaultStream \ | |
torbjorng (webrtc)
2016/03/17 15:59:45
MAYBE_SdpWithoutMsidCreatesDefaultStream is not us
stefan-webrtc
2016/03/17 16:29:57
Thanks. Relied too much on the try bot, which went
| |
2045 DISABLED_SdpWithoutMsidCreatesDefaultStream | |
2046 #else | |
2047 #define MAYBE_SdpWithoutMsidCreatesDefaultStream \ | |
2048 SdpWithoutMsidCreatesDefaultStream | |
2049 #endif | |
2036 // This tests that a default MediaStream is created if a remote session | 2050 // This tests that a default MediaStream is created if a remote session |
2037 // description doesn't contain any streams and no MSID support. | 2051 // description doesn't contain any streams and no MSID support. |
2038 // It also tests that the default stream is updated if a video m-line is added | 2052 // It also tests that the default stream is updated if a video m-line is added |
2039 // in a subsequent session description. | 2053 // in a subsequent session description. |
2040 TEST_F(PeerConnectionInterfaceTest, SdpWithoutMsidCreatesDefaultStream) { | 2054 TEST_F(PeerConnectionInterfaceTest, SdpWithoutMsidCreatesDefaultStream) { |
2041 FakeConstraints constraints; | 2055 FakeConstraints constraints; |
2042 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2056 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2043 true); | 2057 true); |
2044 CreatePeerConnection(&constraints); | 2058 CreatePeerConnection(&constraints); |
2045 CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly); | 2059 CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly); |
(...skipping 10 matching lines...) Expand all Loading... | |
2056 ASSERT_EQ(1u, remote_stream->GetAudioTracks().size()); | 2070 ASSERT_EQ(1u, remote_stream->GetAudioTracks().size()); |
2057 EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id()); | 2071 EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id()); |
2058 EXPECT_EQ(MediaStreamTrackInterface::kLive, | 2072 EXPECT_EQ(MediaStreamTrackInterface::kLive, |
2059 remote_stream->GetAudioTracks()[0]->state()); | 2073 remote_stream->GetAudioTracks()[0]->state()); |
2060 ASSERT_EQ(1u, remote_stream->GetVideoTracks().size()); | 2074 ASSERT_EQ(1u, remote_stream->GetVideoTracks().size()); |
2061 EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id()); | 2075 EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id()); |
2062 EXPECT_EQ(MediaStreamTrackInterface::kLive, | 2076 EXPECT_EQ(MediaStreamTrackInterface::kLive, |
2063 remote_stream->GetVideoTracks()[0]->state()); | 2077 remote_stream->GetVideoTracks()[0]->state()); |
2064 } | 2078 } |
2065 | 2079 |
2080 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2081 #if defined(WIN) && defined(_DEBUG) | |
2082 #define MAYBE_SendOnlySdpWithoutMsidCreatesDefaultStream \ | |
2083 DISABLED_SendOnlySdpWithoutMsidCreatesDefaultStream | |
2084 #else | |
2085 #define MAYBE_SendOnlySdpWithoutMsidCreatesDefaultStream \ | |
2086 SendOnlySdpWithoutMsidCreatesDefaultStream | |
2087 #endif | |
2066 // This tests that a default MediaStream is created if a remote session | 2088 // This tests that a default MediaStream is created if a remote session |
2067 // description doesn't contain any streams and media direction is send only. | 2089 // description doesn't contain any streams and media direction is send only. |
2068 TEST_F(PeerConnectionInterfaceTest, | 2090 TEST_F(PeerConnectionInterfaceTest, |
2069 SendOnlySdpWithoutMsidCreatesDefaultStream) { | 2091 MAYBE_SendOnlySdpWithoutMsidCreatesDefaultStream) { |
2070 FakeConstraints constraints; | 2092 FakeConstraints constraints; |
2071 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2093 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2072 true); | 2094 true); |
2073 CreatePeerConnection(&constraints); | 2095 CreatePeerConnection(&constraints); |
2074 CreateAndSetRemoteOffer(kSdpStringSendOnlyWithoutStreams); | 2096 CreateAndSetRemoteOffer(kSdpStringSendOnlyWithoutStreams); |
2075 | 2097 |
2076 ASSERT_EQ(1u, observer_.remote_streams()->count()); | 2098 ASSERT_EQ(1u, observer_.remote_streams()->count()); |
2077 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); | 2099 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); |
2078 | 2100 |
2079 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); | 2101 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); |
(...skipping 11 matching lines...) Expand all Loading... | |
2091 CreateAndSetRemoteOffer(kSdpStringWithStream1); | 2113 CreateAndSetRemoteOffer(kSdpStringWithStream1); |
2092 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); | 2114 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); |
2093 remote_stream->RemoveTrack(remote_stream->GetAudioTracks()[0]); | 2115 remote_stream->RemoveTrack(remote_stream->GetAudioTracks()[0]); |
2094 remote_stream->RemoveTrack(remote_stream->GetVideoTracks()[0]); | 2116 remote_stream->RemoveTrack(remote_stream->GetVideoTracks()[0]); |
2095 | 2117 |
2096 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); | 2118 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); |
2097 | 2119 |
2098 // No crash is a pass. | 2120 // No crash is a pass. |
2099 } | 2121 } |
2100 | 2122 |
2123 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2124 #if defined(WIN) && defined(_DEBUG) | |
2125 #define MAYBE_SdpWithoutMsidAndStreamsCreatesDefaultStream \ | |
2126 DISABLED_SdpWithoutMsidAndStreamsCreatesDefaultStream | |
2127 #else | |
2128 #define MAYBE_SdpWithoutMsidAndStreamsCreatesDefaultStream \ | |
2129 SdpWithoutMsidAndStreamsCreatesDefaultStream | |
2130 #endif | |
2101 // This tests that a default MediaStream is created if the remote session | 2131 // This tests that a default MediaStream is created if the remote session |
2102 // description doesn't contain any streams and don't contain an indication if | 2132 // description doesn't contain any streams and don't contain an indication if |
2103 // MSID is supported. | 2133 // MSID is supported. |
2104 TEST_F(PeerConnectionInterfaceTest, | 2134 TEST_F(PeerConnectionInterfaceTest, |
2105 SdpWithoutMsidAndStreamsCreatesDefaultStream) { | 2135 MAYBE_SdpWithoutMsidAndStreamsCreatesDefaultStream) { |
2106 FakeConstraints constraints; | 2136 FakeConstraints constraints; |
2107 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2137 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2108 true); | 2138 true); |
2109 CreatePeerConnection(&constraints); | 2139 CreatePeerConnection(&constraints); |
2110 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); | 2140 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); |
2111 | 2141 |
2112 ASSERT_EQ(1u, observer_.remote_streams()->count()); | 2142 ASSERT_EQ(1u, observer_.remote_streams()->count()); |
2113 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); | 2143 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); |
2114 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); | 2144 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); |
2115 EXPECT_EQ(1u, remote_stream->GetVideoTracks().size()); | 2145 EXPECT_EQ(1u, remote_stream->GetVideoTracks().size()); |
2116 } | 2146 } |
2117 | 2147 |
2148 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2149 #if defined(WIN) && defined(_DEBUG) | |
2150 #define MAYBE_SdpWithMsidDontCreatesDefaultStream \ | |
2151 DISABLED_SdpWithMsidDontCreatesDefaultStream | |
2152 #else | |
2153 #define MAYBE_SdpWithMsidDontCreatesDefaultStream \ | |
2154 SdpWithMsidDontCreatesDefaultStream | |
2155 #endif | |
2118 // This tests that a default MediaStream is not created if the remote session | 2156 // This tests that a default MediaStream is not created if the remote session |
2119 // description doesn't contain any streams but does support MSID. | 2157 // description doesn't contain any streams but does support MSID. |
2120 TEST_F(PeerConnectionInterfaceTest, SdpWithMsidDontCreatesDefaultStream) { | 2158 TEST_F(PeerConnectionInterfaceTest, MAYBE_SdpWithMsidDontCreatesDefaultStream) { |
2121 FakeConstraints constraints; | 2159 FakeConstraints constraints; |
2122 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2160 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2123 true); | 2161 true); |
2124 CreatePeerConnection(&constraints); | 2162 CreatePeerConnection(&constraints); |
2125 CreateAndSetRemoteOffer(kSdpStringWithMsidWithoutStreams); | 2163 CreateAndSetRemoteOffer(kSdpStringWithMsidWithoutStreams); |
2126 EXPECT_EQ(0u, observer_.remote_streams()->count()); | 2164 EXPECT_EQ(0u, observer_.remote_streams()->count()); |
2127 } | 2165 } |
2128 | 2166 |
2167 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2168 #if defined(WIN) && defined(_DEBUG) | |
2169 #define MAYBE_DefaultTracksNotDestroyedAndRecreated \ | |
torbjorng (webrtc)
2016/03/17 15:59:46
MAYBE_DefaultTracksNotDestroyedAndRecreated is not
| |
2170 DISABLED_DefaultTracksNotDestroyedAndRecreated | |
2171 #else | |
2172 #define MAYBE_DefaultTracksNotDestroyedAndRecreated \ | |
2173 DefaultTracksNotDestroyedAndRecreated | |
2174 #endif | |
2129 // This tests that when setting a new description, the old default tracks are | 2175 // This tests that when setting a new description, the old default tracks are |
2130 // not destroyed and recreated. | 2176 // not destroyed and recreated. |
2131 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=5250 | 2177 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=5250 |
2132 TEST_F(PeerConnectionInterfaceTest, DefaultTracksNotDestroyedAndRecreated) { | 2178 TEST_F(PeerConnectionInterfaceTest, DefaultTracksNotDestroyedAndRecreated) { |
2133 FakeConstraints constraints; | 2179 FakeConstraints constraints; |
2134 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2180 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2135 true); | 2181 true); |
2136 CreatePeerConnection(&constraints); | 2182 CreatePeerConnection(&constraints); |
2137 CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly); | 2183 CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly); |
2138 | 2184 |
(...skipping 18 matching lines...) Expand all Loading... | |
2157 CreatePeerConnection(&constraints); | 2203 CreatePeerConnection(&constraints); |
2158 CreateAndSetRemoteOffer(kSdpStringWithStream1); | 2204 CreateAndSetRemoteOffer(kSdpStringWithStream1); |
2159 rtc::scoped_refptr<StreamCollection> reference(CreateStreamCollection(1)); | 2205 rtc::scoped_refptr<StreamCollection> reference(CreateStreamCollection(1)); |
2160 EXPECT_TRUE( | 2206 EXPECT_TRUE( |
2161 CompareStreamCollections(observer_.remote_streams(), reference.get())); | 2207 CompareStreamCollections(observer_.remote_streams(), reference.get())); |
2162 | 2208 |
2163 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); | 2209 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); |
2164 EXPECT_EQ(0u, observer_.remote_streams()->count()); | 2210 EXPECT_EQ(0u, observer_.remote_streams()->count()); |
2165 } | 2211 } |
2166 | 2212 |
2213 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2214 #if defined(WIN) && defined(_DEBUG) | |
2215 #define MAYBE_LocalDescriptionChanged DISABLED_LocalDescriptionChanged | |
2216 #else | |
2217 #define MAYBE_LocalDescriptionChanged LocalDescriptionChanged | |
2218 #endif | |
2167 // This tests that an RtpSender is created when the local description is set | 2219 // This tests that an RtpSender is created when the local description is set |
2168 // after adding a local stream. | 2220 // after adding a local stream. |
2169 // TODO(deadbeef): This test and the one below it need to be updated when | 2221 // TODO(deadbeef): This test and the one below it need to be updated when |
2170 // an RtpSender's lifetime isn't determined by when a local description is set. | 2222 // an RtpSender's lifetime isn't determined by when a local description is set. |
2171 TEST_F(PeerConnectionInterfaceTest, LocalDescriptionChanged) { | 2223 TEST_F(PeerConnectionInterfaceTest, MAYBE_LocalDescriptionChanged) { |
2172 FakeConstraints constraints; | 2224 FakeConstraints constraints; |
2173 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2225 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2174 true); | 2226 true); |
2175 CreatePeerConnection(&constraints); | 2227 CreatePeerConnection(&constraints); |
2176 // Create an offer just to ensure we have an identity before we manually | 2228 // Create an offer just to ensure we have an identity before we manually |
2177 // call SetLocalDescription. | 2229 // call SetLocalDescription. |
2178 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; | 2230 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; |
2179 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); | 2231 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); |
2180 | 2232 |
2181 rtc::scoped_ptr<SessionDescriptionInterface> desc_1 = | 2233 rtc::scoped_ptr<SessionDescriptionInterface> desc_1 = |
(...skipping 15 matching lines...) Expand all Loading... | |
2197 pc_->AddStream(reference_collection_->at(0)); | 2249 pc_->AddStream(reference_collection_->at(0)); |
2198 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); | 2250 EXPECT_TRUE(DoSetLocalDescription(desc_2.release())); |
2199 senders = pc_->GetSenders(); | 2251 senders = pc_->GetSenders(); |
2200 EXPECT_EQ(2u, senders.size()); | 2252 EXPECT_EQ(2u, senders.size()); |
2201 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 2253 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
2202 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 2254 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
2203 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); | 2255 EXPECT_FALSE(ContainsSender(senders, kAudioTracks[1])); |
2204 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); | 2256 EXPECT_FALSE(ContainsSender(senders, kVideoTracks[1])); |
2205 } | 2257 } |
2206 | 2258 |
2259 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2260 #if defined(WIN) && defined(_DEBUG) | |
2261 #define MAYBE_AddLocalStreamAfterLocalDescriptionChanged \ | |
2262 DISABLED_AddLocalStreamAfterLocalDescriptionChanged | |
2263 #else | |
2264 #define MAYBE_AddLocalStreamAfterLocalDescriptionChanged \ | |
2265 AddLocalStreamAfterLocalDescriptionChanged | |
2266 #endif | |
2207 // This tests that an RtpSender is created when the local description is set | 2267 // This tests that an RtpSender is created when the local description is set |
2208 // before adding a local stream. | 2268 // before adding a local stream. |
2209 TEST_F(PeerConnectionInterfaceTest, | 2269 TEST_F(PeerConnectionInterfaceTest, |
2210 AddLocalStreamAfterLocalDescriptionChanged) { | 2270 MAYBE_AddLocalStreamAfterLocalDescriptionChanged) { |
2211 FakeConstraints constraints; | 2271 FakeConstraints constraints; |
2212 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2272 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2213 true); | 2273 true); |
2214 CreatePeerConnection(&constraints); | 2274 CreatePeerConnection(&constraints); |
2215 // Create an offer just to ensure we have an identity before we manually | 2275 // Create an offer just to ensure we have an identity before we manually |
2216 // call SetLocalDescription. | 2276 // call SetLocalDescription. |
2217 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; | 2277 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; |
2218 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); | 2278 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); |
2219 | 2279 |
2220 rtc::scoped_ptr<SessionDescriptionInterface> desc_1 = | 2280 rtc::scoped_ptr<SessionDescriptionInterface> desc_1 = |
2221 CreateSessionDescriptionAndReference(2, 2); | 2281 CreateSessionDescriptionAndReference(2, 2); |
2222 | 2282 |
2223 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); | 2283 EXPECT_TRUE(DoSetLocalDescription(desc_1.release())); |
2224 auto senders = pc_->GetSenders(); | 2284 auto senders = pc_->GetSenders(); |
2225 EXPECT_EQ(0u, senders.size()); | 2285 EXPECT_EQ(0u, senders.size()); |
2226 | 2286 |
2227 pc_->AddStream(reference_collection_->at(0)); | 2287 pc_->AddStream(reference_collection_->at(0)); |
2228 senders = pc_->GetSenders(); | 2288 senders = pc_->GetSenders(); |
2229 EXPECT_EQ(4u, senders.size()); | 2289 EXPECT_EQ(4u, senders.size()); |
2230 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 2290 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
2231 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 2291 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
2232 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); | 2292 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[1])); |
2233 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); | 2293 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[1])); |
2234 } | 2294 } |
2235 | 2295 |
2296 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2297 #if defined(WIN) && defined(_DEBUG) | |
2298 #define MAYBE_ChangeSsrcOnTrackInLocalSessionDescription \ | |
2299 DISABLED_ChangeSsrcOnTrackInLocalSessionDescription | |
2300 #else | |
2301 #define MAYBE_ChangeSsrcOnTrackInLocalSessionDescription \ | |
2302 ChangeSsrcOnTrackInLocalSessionDescription | |
2303 #endif | |
2236 // This tests that the expected behavior occurs if the SSRC on a local track is | 2304 // This tests that the expected behavior occurs if the SSRC on a local track is |
2237 // changed when SetLocalDescription is called. | 2305 // changed when SetLocalDescription is called. |
2238 TEST_F(PeerConnectionInterfaceTest, | 2306 TEST_F(PeerConnectionInterfaceTest, |
2239 ChangeSsrcOnTrackInLocalSessionDescription) { | 2307 MAYBE_ChangeSsrcOnTrackInLocalSessionDescription) { |
2240 FakeConstraints constraints; | 2308 FakeConstraints constraints; |
2241 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2309 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2242 true); | 2310 true); |
2243 CreatePeerConnection(&constraints); | 2311 CreatePeerConnection(&constraints); |
2244 // Create an offer just to ensure we have an identity before we manually | 2312 // Create an offer just to ensure we have an identity before we manually |
2245 // call SetLocalDescription. | 2313 // call SetLocalDescription. |
2246 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; | 2314 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; |
2247 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); | 2315 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); |
2248 | 2316 |
2249 rtc::scoped_ptr<SessionDescriptionInterface> desc = | 2317 rtc::scoped_ptr<SessionDescriptionInterface> desc = |
(...skipping 23 matching lines...) Expand all Loading... | |
2273 | 2341 |
2274 EXPECT_TRUE(DoSetLocalDescription(updated_desc.release())); | 2342 EXPECT_TRUE(DoSetLocalDescription(updated_desc.release())); |
2275 senders = pc_->GetSenders(); | 2343 senders = pc_->GetSenders(); |
2276 EXPECT_EQ(2u, senders.size()); | 2344 EXPECT_EQ(2u, senders.size()); |
2277 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); | 2345 EXPECT_TRUE(ContainsSender(senders, kAudioTracks[0])); |
2278 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); | 2346 EXPECT_TRUE(ContainsSender(senders, kVideoTracks[0])); |
2279 // TODO(deadbeef): Once RtpSenders expose parameters, check that the SSRC | 2347 // TODO(deadbeef): Once RtpSenders expose parameters, check that the SSRC |
2280 // changed. | 2348 // changed. |
2281 } | 2349 } |
2282 | 2350 |
2351 // Disabled on Win dbg: https://bugs.chromium.org/p/webrtc/issues/detail?id=5659 | |
2352 #if defined(WIN) && defined(_DEBUG) | |
2353 #define MAYBE_SignalSameTracksInSeparateMediaStream \ | |
2354 DISABLED_SignalSameTracksInSeparateMediaStream | |
2355 #else | |
2356 #define MAYBE_SignalSameTracksInSeparateMediaStream \ | |
2357 SignalSameTracksInSeparateMediaStream | |
2358 #endif | |
2283 // This tests that the expected behavior occurs if a new session description is | 2359 // This tests that the expected behavior occurs if a new session description is |
2284 // set with the same tracks, but on a different MediaStream. | 2360 // set with the same tracks, but on a different MediaStream. |
2285 TEST_F(PeerConnectionInterfaceTest, SignalSameTracksInSeparateMediaStream) { | 2361 TEST_F(PeerConnectionInterfaceTest, |
2362 MAYBE_SignalSameTracksInSeparateMediaStream) { | |
2286 FakeConstraints constraints; | 2363 FakeConstraints constraints; |
2287 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2364 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2288 true); | 2365 true); |
2289 CreatePeerConnection(&constraints); | 2366 CreatePeerConnection(&constraints); |
2290 // Create an offer just to ensure we have an identity before we manually | 2367 // Create an offer just to ensure we have an identity before we manually |
2291 // call SetLocalDescription. | 2368 // call SetLocalDescription. |
2292 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; | 2369 rtc::scoped_ptr<SessionDescriptionInterface> throwaway; |
2293 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); | 2370 ASSERT_TRUE(DoCreateOffer(&throwaway, nullptr)); |
2294 | 2371 |
2295 rtc::scoped_ptr<SessionDescriptionInterface> desc = | 2372 rtc::scoped_ptr<SessionDescriptionInterface> desc = |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2605 FakeConstraints updated_answer_c; | 2682 FakeConstraints updated_answer_c; |
2606 answer_c.SetMandatoryReceiveAudio(false); | 2683 answer_c.SetMandatoryReceiveAudio(false); |
2607 answer_c.SetMandatoryReceiveVideo(false); | 2684 answer_c.SetMandatoryReceiveVideo(false); |
2608 | 2685 |
2609 cricket::MediaSessionOptions updated_answer_options; | 2686 cricket::MediaSessionOptions updated_answer_options; |
2610 EXPECT_TRUE( | 2687 EXPECT_TRUE( |
2611 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2688 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2612 EXPECT_TRUE(updated_answer_options.has_audio()); | 2689 EXPECT_TRUE(updated_answer_options.has_audio()); |
2613 EXPECT_TRUE(updated_answer_options.has_video()); | 2690 EXPECT_TRUE(updated_answer_options.has_video()); |
2614 } | 2691 } |
OLD | NEW |