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

Unified Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 138803002: SPDY4: Turn SYN_STREAM and SYN_REPLY into HEADERS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows bool-cast fix. Created 6 years, 11 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_protocol.h » ('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 93ba0280119ba5393368948320198921594ba693..b60eac2fb218ca2010311a9887e4200cbe5b66b4 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1971,7 +1971,11 @@ TEST_P(SpdyNetworkTransactionTest, NullPost) {
scoped_ptr<SpdyFrame> req(
spdy_util_.ConstructSpdyPost(kRequestUrl, 1, 0, LOWEST, NULL, 0));
// Set the FIN bit since there will be no body.
- test::SetFrameFlags(req.get(), CONTROL_FLAG_FIN, spdy_util_.spdy_version());
+ int flags = CONTROL_FLAG_FIN;
+ if (spdy_util_.spdy_version() >= SPDY4) {
+ flags |= HEADERS_FLAG_PRIORITY;
+ }
+ test::SetFrameFlags(req.get(), flags, spdy_util_.spdy_version());
MockWrite writes[] = {
CreateMockWrite(*req),
};
@@ -2013,7 +2017,11 @@ TEST_P(SpdyNetworkTransactionTest, EmptyPost) {
spdy_util_.ConstructSpdyPost(
kRequestUrl, 1, kContentLength, LOWEST, NULL, 0));
// Set the FIN bit since there will be no body.
- test::SetFrameFlags(req.get(), CONTROL_FLAG_FIN, spdy_util_.spdy_version());
+ int flags = CONTROL_FLAG_FIN;
+ if (spdy_util_.spdy_version() >= SPDY4) {
+ flags |= HEADERS_FLAG_PRIORITY;
+ }
+ test::SetFrameFlags(req.get(), flags, spdy_util_.spdy_version());
MockWrite writes[] = {
CreateMockWrite(*req),
};
@@ -2155,7 +2163,7 @@ TEST_P(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) {
scoped_ptr<SpdyFrame> req(
spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true));
scoped_ptr<SpdyFrame> rst(
- spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_STREAM_IN_USE));
+ spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR));
MockWrite writes[] = {
CreateMockWrite(*req),
CreateMockWrite(*rst),
@@ -3035,6 +3043,11 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushMultipleDataFrameInterrupted) {
}
TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
+ if (spdy_util_.spdy_version() == SPDY4) {
+ // TODO(jgraettinger): We don't support associated stream
+ // checks in SPDY4 yet.
+ return;
+ }
scoped_ptr<SpdyFrame> stream1_syn(
spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true));
scoped_ptr<SpdyFrame> stream1_body(
@@ -3096,6 +3109,11 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
}
TEST_P(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID9) {
+ if (spdy_util_.spdy_version() == SPDY4) {
+ // TODO(jgraettinger): We don't support associated stream
+ // checks in SPDY4 yet.
+ return;
+ }
scoped_ptr<SpdyFrame> stream1_syn(
spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true));
scoped_ptr<SpdyFrame> stream1_body(
@@ -5581,6 +5599,11 @@ TEST_P(SpdyNetworkTransactionTest, SynReplyWithLateHeaders) {
}
TEST_P(SpdyNetworkTransactionTest, ServerPushCrossOriginCorrectness) {
+ if (spdy_util_.spdy_version() == SPDY4) {
+ // TODO(jgraettinger): We don't support associated stream
+ // checks in SPDY4 yet.
+ return;
+ }
// In this test we want to verify that we can't accidentally push content
// which can't be pushed by this content server.
// This test assumes that:
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698