Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / net / quic / quic_http_stream_test.cc
index c0643d4..932f566 100644 (file)
@@ -11,6 +11,7 @@
 #include "net/base/upload_bytes_element_reader.h"
 #include "net/base/upload_data_stream.h"
 #include "net/http/http_response_headers.h"
+#include "net/http/transport_security_state.h"
 #include "net/quic/congestion_control/receive_algorithm_interface.h"
 #include "net/quic/congestion_control/send_algorithm_interface.h"
 #include "net/quic/crypto/crypto_protocol.h"
@@ -59,7 +60,12 @@ class TestQuicConnection : public QuicConnection {
                      IPEndPoint address,
                      QuicConnectionHelper* helper,
                      QuicPacketWriter* writer)
-      : QuicConnection(connection_id, address, helper, writer, false,
+      : QuicConnection(connection_id,
+                       address,
+                       helper,
+                       writer,
+                       false  /* owns_writer */,
+                       false  /* is_server */,
                        versions) {
   }
 
@@ -209,6 +215,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
                               scoped_ptr<DatagramClientSocket>(socket),
                               writer_.Pass(), NULL,
                               &crypto_client_stream_factory_,
+                              &transport_security_state_,
                               make_scoped_ptr((QuicServerInfo*)NULL),
                               QuicServerId(kServerHostname, kServerPort,
                                            false, PRIVACY_MODE_DISABLED),
@@ -216,6 +223,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
                               base::MessageLoop::current()->
                                   message_loop_proxy().get(),
                               NULL));
+    session_->InitializeSession();
     session_->GetCryptoStream()->CryptoConnect();
     EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
     stream_.reset(use_closing_stream_ ?
@@ -293,6 +301,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
   testing::StrictMock<MockConnectionVisitor> visitor_;
   scoped_ptr<QuicHttpStream> stream_;
   scoped_ptr<QuicDefaultPacketWriter> writer_;
+  TransportSecurityState transport_security_state_;
   scoped_ptr<QuicClientSession> session_;
   QuicCryptoClientConfig crypto_config_;
   TestCompletionCallback callback_;