OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 "webrtc/media/base/turnutils.h" | 11 #include "webrtc/media/base/turnutils.h" |
12 | 12 |
13 #include <stddef.h> | 13 #include <stddef.h> |
14 | 14 |
15 #include "webrtc/base/gunit.h" | 15 #include "webrtc/rtc_base/gunit.h" |
16 | 16 |
17 namespace cricket { | 17 namespace cricket { |
18 | 18 |
19 // Invalid TURN send indication messages. Messages are proper STUN | 19 // Invalid TURN send indication messages. Messages are proper STUN |
20 // messages with incorrect values in attributes. | 20 // messages with incorrect values in attributes. |
21 TEST(TurnUtilsTest, InvalidTurnSendIndicationMessages) { | 21 TEST(TurnUtilsTest, InvalidTurnSendIndicationMessages) { |
22 size_t content_pos = SIZE_MAX; | 22 size_t content_pos = SIZE_MAX; |
23 size_t content_size = SIZE_MAX; | 23 size_t content_size = SIZE_MAX; |
24 | 24 |
25 // Stun Indication message with Zero length | 25 // Stun Indication message with Zero length |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 size_t content_pos = SIZE_MAX; | 111 size_t content_pos = SIZE_MAX; |
112 size_t content_size = SIZE_MAX; | 112 size_t content_size = SIZE_MAX; |
113 EXPECT_TRUE(UnwrapTurnPacket(kTurnChannelMsgWithZeroLength, | 113 EXPECT_TRUE(UnwrapTurnPacket(kTurnChannelMsgWithZeroLength, |
114 sizeof(kTurnChannelMsgWithZeroLength), | 114 sizeof(kTurnChannelMsgWithZeroLength), |
115 &content_pos, &content_size)); | 115 &content_pos, &content_size)); |
116 EXPECT_EQ(4, content_pos); | 116 EXPECT_EQ(4, content_pos); |
117 EXPECT_EQ(0, content_size); | 117 EXPECT_EQ(0, content_size); |
118 } | 118 } |
119 | 119 |
120 } // namespace cricket | 120 } // namespace cricket |
OLD | NEW |