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

Side by Side Diff: net/spdy/spdy_network_transaction_spdy3_unittest.cc

Issue 10209012: Move SpdyFramer::set_enable_compression_default to BufferedSpdyFramer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to BufferedSpdyFramer Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_test_util_spdy2.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 TransactionHelperResult out = helper.output(); 4063 TransactionHelperResult out = helper.output();
4064 EXPECT_EQ(OK, out.rv); 4064 EXPECT_EQ(OK, out.rv);
4065 EXPECT_EQ("HTTP/1.1 200 OK", out.status_line); 4065 EXPECT_EQ("HTTP/1.1 200 OK", out.status_line);
4066 EXPECT_EQ("hello!", out.response_data); 4066 EXPECT_EQ("hello!", out.response_data);
4067 } 4067 }
4068 4068
4069 // In this test, we enable compression, but get a uncompressed SynReply from 4069 // In this test, we enable compression, but get a uncompressed SynReply from
4070 // the server. Verify that teardown is all clean. 4070 // the server. Verify that teardown is all clean.
4071 TEST_P(SpdyNetworkTransactionSpdy3Test, DecompressFailureOnSynReply) { 4071 TEST_P(SpdyNetworkTransactionSpdy3Test, DecompressFailureOnSynReply) {
4072 // For this test, we turn on the normal compression. 4072 // For this test, we turn on the normal compression.
4073 SpdyFramer::set_enable_compression_default(true); 4073 BufferedSpdyFramer::set_enable_compression_default(true);
4074 4074
4075 scoped_ptr<SpdyFrame> compressed( 4075 scoped_ptr<SpdyFrame> compressed(
4076 ConstructSpdyGet(NULL, 0, true, 1, LOWEST)); 4076 ConstructSpdyGet(NULL, 0, true, 1, LOWEST));
4077 scoped_ptr<SpdyFrame> rst( 4077 scoped_ptr<SpdyFrame> rst(
4078 ConstructSpdyRstStream(1, PROTOCOL_ERROR)); 4078 ConstructSpdyRstStream(1, PROTOCOL_ERROR));
4079 MockWrite writes[] = { 4079 MockWrite writes[] = {
4080 CreateMockWrite(*compressed), 4080 CreateMockWrite(*compressed),
4081 }; 4081 };
4082 4082
4083 scoped_ptr<SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1)); 4083 scoped_ptr<SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1));
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
6132 << " Write index: " 6132 << " Write index: "
6133 << data->write_index(); 6133 << data->write_index();
6134 6134
6135 // Verify the SYN_REPLY. 6135 // Verify the SYN_REPLY.
6136 HttpResponseInfo response = *trans->GetResponseInfo(); 6136 HttpResponseInfo response = *trans->GetResponseInfo();
6137 EXPECT_TRUE(response.headers != NULL); 6137 EXPECT_TRUE(response.headers != NULL);
6138 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); 6138 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine());
6139 } 6139 }
6140 6140
6141 } // namespace net 6141 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_test_util_spdy2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698