| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool can_receive_video() { | 379 bool can_receive_video() { |
| 380 bool value; | 380 bool value; |
| 381 if (webrtc::FindConstraint(&session_description_constraints_, | 381 if (webrtc::FindConstraint(&session_description_constraints_, |
| 382 MediaConstraintsInterface::kOfferToReceiveVideo, | 382 MediaConstraintsInterface::kOfferToReceiveVideo, |
| 383 &value, nullptr)) { | 383 &value, nullptr)) { |
| 384 return value; | 384 return value; |
| 385 } | 385 } |
| 386 return true; | 386 return true; |
| 387 } | 387 } |
| 388 | 388 |
| 389 void OnIceComplete() override { LOG(INFO) << id_ << "OnIceComplete"; } | |
| 390 | |
| 391 void OnDataChannel(DataChannelInterface* data_channel) override { | 389 void OnDataChannel(DataChannelInterface* data_channel) override { |
| 392 LOG(INFO) << id_ << "OnDataChannel"; | 390 LOG(INFO) << id_ << "OnDataChannel"; |
| 393 data_channel_ = data_channel; | 391 data_channel_ = data_channel; |
| 394 data_observer_.reset(new MockDataChannelObserver(data_channel)); | 392 data_observer_.reset(new MockDataChannelObserver(data_channel)); |
| 395 } | 393 } |
| 396 | 394 |
| 397 void CreateDataChannel() { | 395 void CreateDataChannel() { |
| 398 data_channel_ = pc()->CreateDataChannel(kDataChannelLabel, nullptr); | 396 data_channel_ = pc()->CreateDataChannel(kDataChannelLabel, nullptr); |
| 399 ASSERT_TRUE(data_channel_.get() != nullptr); | 397 ASSERT_TRUE(data_channel_.get() != nullptr); |
| 400 data_observer_.reset(new MockDataChannelObserver(data_channel_)); | 398 data_observer_.reset(new MockDataChannelObserver(data_channel_)); |
| (...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 PeerConnectionInterface::IceServer server; | 2020 PeerConnectionInterface::IceServer server; |
| 2023 server.urls.push_back("turn:hostname"); | 2021 server.urls.push_back("turn:hostname"); |
| 2024 server.urls.push_back("turn:hostname2"); | 2022 server.urls.push_back("turn:hostname2"); |
| 2025 servers.push_back(server); | 2023 servers.push_back(server); |
| 2026 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); | 2024 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); |
| 2027 EXPECT_EQ(2U, turn_servers_.size()); | 2025 EXPECT_EQ(2U, turn_servers_.size()); |
| 2028 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); | 2026 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); |
| 2029 } | 2027 } |
| 2030 | 2028 |
| 2031 #endif // if !defined(THREAD_SANITIZER) | 2029 #endif // if !defined(THREAD_SANITIZER) |
| OLD | NEW |