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

Unified Diff: net/spdy/fuzzing/hpack_fuzz_util_test.cc

Issue 2801603003: Add SpdyString alias for std::string in net/spdy. (Closed)
Patch Set: Created 3 years, 8 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/spdy/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/header_coalescer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/fuzzing/hpack_fuzz_util_test.cc
diff --git a/net/spdy/fuzzing/hpack_fuzz_util_test.cc b/net/spdy/fuzzing/hpack_fuzz_util_test.cc
index d5f0677963727a72dd0fd3776df8dcdedc047b75..bbc72dfdbb07c44604f877bbe772b371d5168cb6 100644
--- a/net/spdy/fuzzing/hpack_fuzz_util_test.cc
+++ b/net/spdy/fuzzing/hpack_fuzz_util_test.cc
@@ -18,7 +18,6 @@ namespace net {
namespace test {
using std::map;
-using std::string;
using test::a2b_hex;
TEST(HpackFuzzUtilTest, GeneratorContextInitialization) {
@@ -85,15 +84,16 @@ TEST(HpackFuzzUtilTest, ParsesSequenceOfHeaderBlocks) {
}
TEST(HpackFuzzUtilTest, SerializedHeaderBlockPrefixes) {
- EXPECT_EQ(string("\x00\x00\x00\x00", 4), HpackFuzzUtil::HeaderBlockPrefix(0));
- EXPECT_EQ(string("\x00\x00\x00\x05", 4), HpackFuzzUtil::HeaderBlockPrefix(5));
+ EXPECT_EQ(SpdyString("\x00\x00\x00\x00", 4),
+ HpackFuzzUtil::HeaderBlockPrefix(0));
+ EXPECT_EQ(SpdyString("\x00\x00\x00\x05", 4),
+ HpackFuzzUtil::HeaderBlockPrefix(5));
EXPECT_EQ("\x4f\xb3\x0a\x91", HpackFuzzUtil::HeaderBlockPrefix(1337133713));
}
TEST(HpackFuzzUtilTest, PassValidInputThroughAllStages) {
// Example lifted from HpackDecoderTest.SectionD4RequestHuffmanExamples.
- string input = a2b_hex("828684418cf1e3c2e5f23a6ba0ab90f4"
- "ff");
+ SpdyString input = a2b_hex("828684418cf1e3c2e5f23a6ba0ab90f4ff");
HpackFuzzUtil::FuzzerContext context;
HpackFuzzUtil::InitializeFuzzerContext(&context);
@@ -135,7 +135,7 @@ TEST(HpackFuzzUtilTest, ValidFuzzExamplesRegressionTest) {
TEST(HpackFuzzUtilTest, FlipBitsMutatesBuffer) {
char buffer[] = "testbuffer1234567890";
- string unmodified(buffer, arraysize(buffer) - 1);
+ SpdyString unmodified(buffer, arraysize(buffer) - 1);
EXPECT_EQ(unmodified, buffer);
HpackFuzzUtil::FlipBits(reinterpret_cast<uint8_t*>(buffer),
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/header_coalescer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698