| 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 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "webrtc/base/gunit.h" | |
| 15 #include "webrtc/pc/iceserverparsing.h" | 14 #include "webrtc/pc/iceserverparsing.h" |
| 15 #include "webrtc/rtc_base/gunit.h" |
| 16 | 16 |
| 17 namespace webrtc { | 17 namespace webrtc { |
| 18 | 18 |
| 19 class IceServerParsingTest : public testing::Test { | 19 class IceServerParsingTest : public testing::Test { |
| 20 public: | 20 public: |
| 21 // Convenience functions for parsing a single URL. Result is stored in | 21 // Convenience functions for parsing a single URL. Result is stored in |
| 22 // |stun_servers_| and |turn_servers_|. | 22 // |stun_servers_| and |turn_servers_|. |
| 23 bool ParseUrl(const std::string& url) { | 23 bool ParseUrl(const std::string& url) { |
| 24 return ParseUrl(url, std::string(), std::string()); | 24 return ParseUrl(url, std::string(), std::string()); |
| 25 } | 25 } |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 server.username = "foo"; | 243 server.username = "foo"; |
| 244 server.password = "bar"; | 244 server.password = "bar"; |
| 245 servers.push_back(server); | 245 servers.push_back(server); |
| 246 EXPECT_EQ(webrtc::RTCErrorType::NONE, | 246 EXPECT_EQ(webrtc::RTCErrorType::NONE, |
| 247 webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); | 247 webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); |
| 248 EXPECT_EQ(2U, turn_servers_.size()); | 248 EXPECT_EQ(2U, turn_servers_.size()); |
| 249 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); | 249 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); |
| 250 } | 250 } |
| 251 | 251 |
| 252 } // namespace webrtc | 252 } // namespace webrtc |
| OLD | NEW |