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

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

Issue 17382012: [SPDY] Refactor SpdyStream's handling of response headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to rename a function Created 7 years, 6 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) 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 6167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6178 base::MessageLoop::current()->RunUntilIdle(); 6178 base::MessageLoop::current()->RunUntilIdle();
6179 6179
6180 // Read the server push body. 6180 // Read the server push body.
6181 std::string result2; 6181 std::string result2;
6182 ReadResult(trans2.get(), &data, &result2); 6182 ReadResult(trans2.get(), &data, &result2);
6183 // Read the response body. 6183 // Read the response body.
6184 std::string result; 6184 std::string result;
6185 ReadResult(trans, &data, &result); 6185 ReadResult(trans, &data, &result);
6186 6186
6187 // Verify that the received push data is same as the expected push data. 6187 // Verify that the received push data is same as the expected push data.
6188 EXPECT_EQ(result2.compare(expected_push_result), 0) 6188 EXPECT_EQ(expected_push_result, result2);
6189 << "Received data: "
6190 << result2
6191 << "||||| Expected data: "
6192 << expected_push_result;
Ryan Hamilton 2013/06/19 18:58:36 nit: are you sure you don't want to keep this extr
akalin 2013/06/21 21:13:25 The same data is already logged by EXPECT_EQ, sinc
6193 6189
6194 // Verify the SYN_REPLY. 6190 // Verify the SYN_REPLY.
6195 // Copy the response info, because trans goes away. 6191 // Copy the response info, because trans goes away.
6196 response = *trans->GetResponseInfo(); 6192 response = *trans->GetResponseInfo();
6197 response2 = *trans2->GetResponseInfo(); 6193 response2 = *trans2->GetResponseInfo();
6198 6194
6199 VerifyStreamsClosed(helper); 6195 VerifyStreamsClosed(helper);
6200 6196
6201 // Verify the SYN_REPLY. 6197 // Verify the SYN_REPLY.
6202 EXPECT_TRUE(response.headers.get() != NULL); 6198 EXPECT_TRUE(response.headers.get() != NULL);
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
6764 // And now we can allow everything else to run to completion. 6760 // And now we can allow everything else to run to completion.
6765 data.SetStop(10); 6761 data.SetStop(10);
6766 data.Run(); 6762 data.Run();
6767 EXPECT_EQ(OK, callback2.WaitForResult()); 6763 EXPECT_EQ(OK, callback2.WaitForResult());
6768 EXPECT_EQ(OK, callback3.WaitForResult()); 6764 EXPECT_EQ(OK, callback3.WaitForResult());
6769 6765
6770 helper.VerifyDataConsumed(); 6766 helper.VerifyDataConsumed();
6771 } 6767 }
6772 6768
6773 } // namespace net 6769 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698