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

Unified Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 202033002: Update SPDY4 length field to exclude frame prefix length. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Related test update Created 6 years, 9 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/spdy_framer_test.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index c80efe8f796bda94e7df182c68bb9d11b085c2fb..bf69f77496c9b705381fac7ca985d2eb89f4375b 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -3648,9 +3648,7 @@ TEST_P(SpdyNetworkTransactionTest, CorruptFrameSessionErrorSpdy4) {
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
BufferedSpdyFramer framer(spdy_util_.spdy_version(), false);
size_t right_size =
- (spdy_util_.spdy_version() < SPDY4) ?
- syn_reply_wrong_length->size() - framer.GetControlFrameHeaderSize() :
- syn_reply_wrong_length->size();
+ syn_reply_wrong_length->size() - framer.GetControlFrameHeaderSize();
size_t wrong_size = right_size - 4;
test::SetFrameLength(syn_reply_wrong_length.get(),
wrong_size,
@@ -3666,7 +3664,8 @@ TEST_P(SpdyNetworkTransactionTest, CorruptFrameSessionErrorSpdy4) {
scoped_ptr<SpdyFrame> body(spdy_util_.ConstructSpdyBodyFrame(1, true));
MockRead reads[] = {
- MockRead(ASYNC, syn_reply_wrong_length->data(), wrong_size),
+ MockRead(ASYNC, syn_reply_wrong_length->data(),
+ syn_reply_wrong_length->size() - 4),
};
DelayedSocketData data(1, reads, arraysize(reads),
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698