зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1152137 - Part 1: Test case. r=ekr
--HG-- extra : rebase_source : aa6edff5a22fe8963715d79149bbb7e8ab19e694
This commit is contained in:
Родитель
2b26fac611
Коммит
0897a326eb
|
@ -45,6 +45,10 @@
|
|||
#include "ice_peer_ctx.h"
|
||||
#include "ice_media_stream.h"
|
||||
|
||||
extern "C" {
|
||||
#include "r_data.h"
|
||||
}
|
||||
|
||||
#define GTEST_HAS_RTTI 0
|
||||
#include "gtest/gtest.h"
|
||||
#include "gtest_utils.h"
|
||||
|
@ -2299,6 +2303,17 @@ TEST_F(PacketFilterTest, TestSendNonRequestStunPacket) {
|
|||
ASSERT_EQ(0, nr_stun_message_destroy(&msg));
|
||||
}
|
||||
|
||||
TEST(InternalsTest, TestAddBogusAttribute) {
|
||||
nr_stun_message *req;
|
||||
ASSERT_EQ(0, nr_stun_message_create(&req));
|
||||
Data *data;
|
||||
ASSERT_EQ(0, r_data_alloc(&data, 3000));
|
||||
memset(data->data, 'A', data->len);
|
||||
ASSERT_TRUE(nr_stun_message_add_message_integrity_attribute(req, data));
|
||||
ASSERT_EQ(0, r_data_destroy(&data));
|
||||
ASSERT_EQ(0, nr_stun_message_destroy(&req));
|
||||
}
|
||||
|
||||
static std::string get_environment(const char *name) {
|
||||
char *value = getenv(name);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче