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

Side by Side Diff: net/spdy/fuzzing/hpack_fuzz_util_test.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 unified diff | Download patch
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/hpack/hpack_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/fuzzing/hpack_fuzz_util.h" 5 #include "net/spdy/fuzzing/hpack_fuzz_util.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 EXPECT_TRUE(HpackFuzzUtil::RunHeaderBlockThroughFuzzerStages( 133 EXPECT_TRUE(HpackFuzzUtil::RunHeaderBlockThroughFuzzerStages(
134 &context, block)); 134 &context, block));
135 } 135 }
136 } 136 }
137 137
138 TEST(HpackFuzzUtilTest, FlipBitsMutatesBuffer) { 138 TEST(HpackFuzzUtilTest, FlipBitsMutatesBuffer) {
139 char buffer[] = "testbuffer1234567890"; 139 char buffer[] = "testbuffer1234567890";
140 string unmodified(buffer, arraysize(buffer) - 1); 140 string unmodified(buffer, arraysize(buffer) - 1);
141 141
142 EXPECT_EQ(unmodified, buffer); 142 EXPECT_EQ(unmodified, buffer);
143 HpackFuzzUtil::FlipBits(reinterpret_cast<uint8*>(buffer), 143 HpackFuzzUtil::FlipBits(reinterpret_cast<uint8_t*>(buffer),
144 arraysize(buffer) - 1, 144 arraysize(buffer) - 1, 1);
145 1);
146 EXPECT_NE(unmodified, buffer); 145 EXPECT_NE(unmodified, buffer);
147 } 146 }
148 147
149 } // namespace test 148 } // namespace test
150 } // namespace net 149 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util.cc ('k') | net/spdy/hpack/hpack_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698