Lines Matching defs:resp
207 DnsResponse resp;
208 memcpy(resp.io_buffer()->data(), response_data, sizeof(response_data));
211 EXPECT_FALSE(resp.InitParse(query->io_buffer()->size() - 1, *query));
212 EXPECT_FALSE(resp.IsValid());
216 EXPECT_FALSE(resp.InitParse(sizeof(response_data), *other_query));
217 EXPECT_FALSE(resp.IsValid());
222 EXPECT_FALSE(resp.InitParse(sizeof(response_data), *wrong_query));
223 EXPECT_FALSE(resp.IsValid());
226 EXPECT_TRUE(resp.InitParse(sizeof(response_data), *query));
227 EXPECT_TRUE(resp.IsValid());
230 EXPECT_EQ(0x8180, resp.flags());
231 EXPECT_EQ(0x0, resp.rcode());
232 EXPECT_EQ(2u, resp.answer_count());
235 EXPECT_EQ(query->qname(), resp.qname());
236 EXPECT_EQ(query->qtype(), resp.qtype());
237 EXPECT_EQ("codereview.chromium.org", resp.GetDottedName());
240 DnsRecordParser parser = resp.Parser();
249 DnsResponse resp;
250 memcpy(resp.io_buffer()->data(), kT0ResponseDatagram,
254 EXPECT_TRUE(resp.InitParseWithoutQuery(sizeof(kT0ResponseDatagram)));
255 EXPECT_TRUE(resp.IsValid());
258 EXPECT_EQ(0x8180, resp.flags());
259 EXPECT_EQ(0x0, resp.rcode());
260 EXPECT_EQ(kT0RecordCount, resp.answer_count());
263 EXPECT_EQ(kT0Qtype, resp.qtype());
264 EXPECT_EQ(kT0HostName, resp.GetDottedName());
267 DnsRecordParser parser = resp.Parser();
300 DnsResponse resp;
301 memcpy(resp.io_buffer()->data(), response_data, sizeof(response_data));
303 EXPECT_TRUE(resp.InitParseWithoutQuery(sizeof(response_data)));
306 EXPECT_EQ(0x8180, resp.flags());
307 EXPECT_EQ(0x0, resp.rcode());
308 EXPECT_EQ(0x1u, resp.answer_count());
311 DnsRecordParser parser = resp.Parser();
358 DnsResponse resp;
359 memcpy(resp.io_buffer()->data(), response_data, sizeof(response_data));
361 EXPECT_TRUE(resp.InitParseWithoutQuery(sizeof(response_data)));
364 EXPECT_EQ(0x8180, resp.flags());
365 EXPECT_EQ(0x0, resp.rcode());
366 EXPECT_EQ(0x01u, resp.answer_count());
369 DnsRecordParser parser = resp.Parser();
389 DnsResponse resp;
390 memcpy(resp.io_buffer()->data(), response_data, sizeof(response_data));
392 EXPECT_FALSE(resp.InitParseWithoutQuery(sizeof(response_data)));