| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/spdy/spdy_network_transaction.h" | 5 #include "net/spdy/spdy_network_transaction.h" | 
| 6 | 6 | 
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" | 
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" | 
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" | 
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" | 
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 840         NULL | 840         NULL | 
| 841       }, | 841       }, | 
| 842     }, | 842     }, | 
| 843     // SYN_REPLY missing version header | 843     // SYN_REPLY missing version header | 
| 844     { 2, | 844     { 2, | 
| 845       { "status", "200", | 845       { "status", "200", | 
| 846         "url", "/index.php", | 846         "url", "/index.php", | 
| 847         NULL | 847         NULL | 
| 848       }, | 848       }, | 
| 849     }, | 849     }, | 
|  | 850     // SYN_REPLY with no headers | 
|  | 851     { 0, { NULL }, }, | 
| 850   }; | 852   }; | 
| 851 | 853 | 
| 852   for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { | 854   for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { | 
| 853     scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0)); | 855     scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0)); | 
| 854     MockWrite writes[] = { | 856     MockWrite writes[] = { | 
| 855       CreateMockWrite(*req), | 857       CreateMockWrite(*req), | 
| 856       MockWrite(true, 0, 0)  // EOF | 858       MockWrite(true, 0, 0)  // EOF | 
| 857     }; | 859     }; | 
| 858 | 860 | 
| 859     scoped_ptr<spdy::SpdyFrame> resp( | 861     scoped_ptr<spdy::SpdyFrame> resp( | 
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2135   EXPECT_TRUE(response->was_fetched_via_spdy); | 2137   EXPECT_TRUE(response->was_fetched_via_spdy); | 
| 2136   out.rv = ReadTransaction(trans.get(), &out.response_data); | 2138   out.rv = ReadTransaction(trans.get(), &out.response_data); | 
| 2137   EXPECT_EQ(ERR_CONNECTION_CLOSED, out.rv); | 2139   EXPECT_EQ(ERR_CONNECTION_CLOSED, out.rv); | 
| 2138 | 2140 | 
| 2139   // Verify that we consumed all test data. | 2141   // Verify that we consumed all test data. | 
| 2140   EXPECT_TRUE(data->at_read_eof()); | 2142   EXPECT_TRUE(data->at_read_eof()); | 
| 2141   EXPECT_TRUE(data->at_write_eof()); | 2143   EXPECT_TRUE(data->at_write_eof()); | 
| 2142 } | 2144 } | 
| 2143 | 2145 | 
| 2144 }  // namespace net | 2146 }  // namespace net | 
| OLD | NEW | 
|---|