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

Unified Diff: net/dns/record_parsed_unittest.cc

Issue 21534003: avoid char+'\xHH' as it's too easy to use values > 127 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: corresponding change in chrome unit tests Created 7 years, 5 months 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/mock_mdns_socket_factory.cc ('k') | net/dns/record_rdata_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/record_parsed_unittest.cc
diff --git a/net/dns/record_parsed_unittest.cc b/net/dns/record_parsed_unittest.cc
index bf99c26680459dccc638caf66584bd29cf6afabc..2864dcbe761cdcd6a6115e9e342e7e971331c315 100644
--- a/net/dns/record_parsed_unittest.cc
+++ b/net/dns/record_parsed_unittest.cc
@@ -12,22 +12,22 @@
namespace net {
-static const char kT1ResponseWithCacheFlushBit[] = {
- '\x0a', 'c', 'o', 'd', 'e', 'r', 'e', 'v', 'i', 'e', 'w',
- '\x08', 'c', 'h', 'r', 'o', 'm', 'i', 'u', 'm',
- '\x03', 'o', 'r', 'g',
- '\x00',
- '\x00', '\x05', // TYPE is CNAME.
- '\x80', '\x01', // CLASS is IN with cache flush bit set.
- '\x00', '\x01', // TTL (4 bytes) is 20 hours, 47 minutes, 48 seconds.
- '\x24', '\x74',
- '\x00', '\x12', // RDLENGTH is 18 bytes.
+static const uint8 kT1ResponseWithCacheFlushBit[] = {
+ 0x0a, 'c', 'o', 'd', 'e', 'r', 'e', 'v', 'i', 'e', 'w',
+ 0x08, 'c', 'h', 'r', 'o', 'm', 'i', 'u', 'm',
+ 0x03, 'o', 'r', 'g',
+ 0x00,
+ 0x00, 0x05, // TYPE is CNAME.
+ 0x80, 0x01, // CLASS is IN with cache flush bit set.
+ 0x00, 0x01, // TTL (4 bytes) is 20 hours, 47 minutes, 48 seconds.
+ 0x24, 0x74,
+ 0x00, 0x12, // RDLENGTH is 18 bytes.
// ghs.l.google.com in DNS format.
- '\x03', 'g', 'h', 's',
- '\x01', 'l',
- '\x06', 'g', 'o', 'o', 'g', 'l', 'e',
- '\x03', 'c', 'o', 'm',
- '\x00'
+ 0x03, 'g', 'h', 's',
+ 0x01, 'l',
+ 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
+ 0x03, 'c', 'o', 'm',
+ 0x00
};
TEST(RecordParsedTest, ParseSingleRecord) {
« no previous file with comments | « net/dns/mock_mdns_socket_factory.cc ('k') | net/dns/record_rdata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698