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

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

Issue 8230037: Send PING to check the status of the SPDY connection. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/base/auth.h" 10 #include "net/base/auth.h"
(...skipping 25 matching lines...) Expand all
36 class SpdyNetworkTransactionTest 36 class SpdyNetworkTransactionTest
37 : public ::testing::TestWithParam<SpdyNetworkTransactionTestTypes> { 37 : public ::testing::TestWithParam<SpdyNetworkTransactionTestTypes> {
38 protected: 38 protected:
39 39
40 virtual void SetUp() { 40 virtual void SetUp() {
41 // By default, all tests turn off compression. 41 // By default, all tests turn off compression.
42 EnableCompression(false); 42 EnableCompression(false);
43 google_get_request_initialized_ = false; 43 google_get_request_initialized_ = false;
44 google_post_request_initialized_ = false; 44 google_post_request_initialized_ = false;
45 google_chunked_post_request_initialized_ = false; 45 google_chunked_post_request_initialized_ = false;
46 // Disable sending PING.
47 SpdySession::set_enable_ping_based_connection_checking(false);
46 } 48 }
47 49
48 virtual void TearDown() { 50 virtual void TearDown() {
49 // Empty the current queue. 51 // Empty the current queue.
50 MessageLoop::current()->RunAllPending(); 52 MessageLoop::current()->RunAllPending();
53 // Enable sending PING.
54 SpdySession::set_enable_ping_based_connection_checking(true);
51 } 55 }
52 56
53 struct TransactionHelperResult { 57 struct TransactionHelperResult {
54 int rv; 58 int rv;
55 std::string status_line; 59 std::string status_line;
56 std::string response_data; 60 std::string response_data;
57 HttpResponseInfo response_info; 61 HttpResponseInfo response_info;
58 }; 62 };
59 63
60 void EnableCompression(bool enabled) { 64 void EnableCompression(bool enabled) {
(...skipping 5594 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 << " Write index: " 5659 << " Write index: "
5656 << data->write_index(); 5660 << data->write_index();
5657 5661
5658 // Verify the SYN_REPLY. 5662 // Verify the SYN_REPLY.
5659 HttpResponseInfo response = *trans->GetResponseInfo(); 5663 HttpResponseInfo response = *trans->GetResponseInfo();
5660 EXPECT_TRUE(response.headers != NULL); 5664 EXPECT_TRUE(response.headers != NULL);
5661 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); 5665 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine());
5662 } 5666 }
5663 5667
5664 } // namespace net 5668 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698