Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: net/dns/mdns_cache_unittest.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/mdns_cache.h ('k') | net/dns/mdns_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_cache_unittest.cc
diff --git a/net/dns/mdns_cache_unittest.cc b/net/dns/mdns_cache_unittest.cc
index c12ad6b6ec3c830fbb88489aea4d8c41df3ea5f4..8e6bd4a5e695737e3d62f96c7c90abf6971eaf7f 100644
--- a/net/dns/mdns_cache_unittest.cc
+++ b/net/dns/mdns_cache_unittest.cc
@@ -18,111 +18,83 @@ using ::testing::StrictMock;
namespace net {
-static const uint8 kTestResponsesDifferentAnswers[] = {
- // Answer 1
- // ghs.l.google.com in DNS format.
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
-
- // Answer 2
- // Pointer to answer 1
- 0xc0, 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 122, // RDATA is the IP: 74.125.95.122
+static const uint8_t kTestResponsesDifferentAnswers[] = {
+ // Answer 1
+ // ghs.l.google.com in DNS format.
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+
+ // Answer 2
+ // Pointer to answer 1
+ 0xc0, 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 122, // RDATA is the IP: 74.125.95.122
};
-static const uint8 kTestResponsesSameAnswers[] = {
- // Answer 1
- // ghs.l.google.com in DNS format.
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
-
- // Answer 2
- // Pointer to answer 1
- 0xc0, 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 112, // TTL (4 bytes) is 112 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+static const uint8_t kTestResponsesSameAnswers[] = {
+ // Answer 1
+ // ghs.l.google.com in DNS format.
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+
+ // Answer 2
+ // Pointer to answer 1
+ 0xc0, 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 112, // TTL (4 bytes) is 112 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
};
-static const uint8 kTestResponseTwoRecords[] = {
- // Answer 1
- // ghs.l.google.com in DNS format. (A)
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
-
- // Answer 2
- // ghs.l.google.com in DNS format. (AAAA)
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x1c, // TYPE is AAA.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 16, // RDLENGTH is 16 bytes.
- 0x4a, 0x7d, 0x4a, 0x7d,
- 0x5f, 0x79, 0x5f, 0x79,
- 0x5f, 0x79, 0x5f, 0x79,
- 0x5f, 0x79, 0x5f, 0x79,
+static const uint8_t kTestResponseTwoRecords[] = {
+ // Answer 1
+ // ghs.l.google.com in DNS format. (A)
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+
+ // Answer 2
+ // ghs.l.google.com in DNS format. (AAAA)
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x1c, // TYPE is AAA.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 16, // RDLENGTH is 16 bytes.
+ 0x4a, 0x7d, 0x4a, 0x7d, 0x5f, 0x79, 0x5f, 0x79, 0x5f, 0x79, 0x5f, 0x79,
+ 0x5f, 0x79, 0x5f, 0x79,
};
-static const uint8 kTestResponsesGoodbyePacket[] = {
- // Answer 1
- // ghs.l.google.com in DNS format. (Goodbye packet)
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 0, // TTL (4 bytes) is zero.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
-
- // Answer 2
- // ghs.l.google.com in DNS format.
- 3, 'g', 'h', 's',
- 1, 'l',
- 6, 'g', 'o', 'o', 'g', 'l', 'e',
- 3, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x01, // TYPE is A.
- 0x00, 0x01, // CLASS is IN.
- 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
- 0, 4, // RDLENGTH is 4 bytes.
- 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+static const uint8_t kTestResponsesGoodbyePacket[] = {
+ // Answer 1
+ // ghs.l.google.com in DNS format. (Goodbye packet)
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 0, // TTL (4 bytes) is zero.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
+
+ // Answer 2
+ // ghs.l.google.com in DNS format.
+ 3, 'g', 'h', 's', 1, 'l', 6, 'g', 'o', 'o', 'g', 'l', 'e', 3, 'c', 'o', 'm',
+ 0x00, 0x00, 0x01, // TYPE is A.
+ 0x00, 0x01, // CLASS is IN.
+ 0, 0, 0, 53, // TTL (4 bytes) is 53 seconds.
+ 0, 4, // RDLENGTH is 4 bytes.
+ 74, 125, 95, 121, // RDATA is the IP: 74.125.95.121
};
class RecordRemovalMock {
« no previous file with comments | « net/dns/mdns_cache.h ('k') | net/dns/mdns_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698