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

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

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « chrome_frame/urlmon_url_request.cc ('k') | net/url_request/url_request_job_tracker_unittest.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) 2010 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "net/base/auth.h" 8 #include "net/base/auth.h"
9 #include "net/base/net_log_unittest.h" 9 #include "net/base/net_log_unittest.h"
10 #include "net/http/http_network_session_peer.h" 10 #include "net/http/http_network_session_peer.h"
11 #include "net/http/http_transaction_unittest.h" 11 #include "net/http/http_transaction_unittest.h"
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 d.set_quit_on_redirect(true); 2245 d.set_quit_on_redirect(true);
2246 r.Start(); 2246 r.Start();
2247 MessageLoop::current()->Run(); 2247 MessageLoop::current()->Run();
2248 2248
2249 EXPECT_EQ(1, d.received_redirect_count()); 2249 EXPECT_EQ(1, d.received_redirect_count());
2250 2250
2251 r.FollowDeferredRedirect(); 2251 r.FollowDeferredRedirect();
2252 MessageLoop::current()->Run(); 2252 MessageLoop::current()->Run();
2253 EXPECT_EQ(1, d.response_started_count()); 2253 EXPECT_EQ(1, d.response_started_count());
2254 EXPECT_FALSE(d.received_data_before_response()); 2254 EXPECT_FALSE(d.received_data_before_response());
2255 EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status()); 2255 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status());
2256 std::string contents("hello!"); 2256 std::string contents("hello!");
2257 EXPECT_EQ(contents, d.data_received()); 2257 EXPECT_EQ(contents, d.data_received());
2258 } 2258 }
2259 EXPECT_TRUE(data->at_read_eof()); 2259 EXPECT_TRUE(data->at_read_eof());
2260 EXPECT_TRUE(data->at_write_eof()); 2260 EXPECT_TRUE(data->at_write_eof());
2261 EXPECT_TRUE(data2->at_read_eof()); 2261 EXPECT_TRUE(data2->at_read_eof());
2262 EXPECT_TRUE(data2->at_write_eof()); 2262 EXPECT_TRUE(data2->at_write_eof());
2263 } 2263 }
2264 2264
2265 // Send a spdy request to www.google.com. Get a pushed stream that redirects to 2265 // Send a spdy request to www.google.com. Get a pushed stream that redirects to
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 2383
2384 d2.set_quit_on_redirect(true); 2384 d2.set_quit_on_redirect(true);
2385 r2.Start(); 2385 r2.Start();
2386 MessageLoop::current()->Run(); 2386 MessageLoop::current()->Run();
2387 EXPECT_EQ(1, d2.received_redirect_count()); 2387 EXPECT_EQ(1, d2.received_redirect_count());
2388 2388
2389 r2.FollowDeferredRedirect(); 2389 r2.FollowDeferredRedirect();
2390 MessageLoop::current()->Run(); 2390 MessageLoop::current()->Run();
2391 EXPECT_EQ(1, d2.response_started_count()); 2391 EXPECT_EQ(1, d2.response_started_count());
2392 EXPECT_FALSE(d2.received_data_before_response()); 2392 EXPECT_FALSE(d2.received_data_before_response());
2393 EXPECT_EQ(URLRequestStatus::SUCCESS, r2.status().status()); 2393 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r2.status().status());
2394 std::string contents2("hello!"); 2394 std::string contents2("hello!");
2395 EXPECT_EQ(contents2, d2.data_received()); 2395 EXPECT_EQ(contents2, d2.data_received());
2396 } 2396 }
2397 data->CompleteRead(); 2397 data->CompleteRead();
2398 data2->CompleteRead(); 2398 data2->CompleteRead();
2399 EXPECT_TRUE(data->at_read_eof()); 2399 EXPECT_TRUE(data->at_read_eof());
2400 EXPECT_TRUE(data->at_write_eof()); 2400 EXPECT_TRUE(data->at_write_eof());
2401 EXPECT_TRUE(data2->at_read_eof()); 2401 EXPECT_TRUE(data2->at_read_eof());
2402 EXPECT_TRUE(data2->at_write_eof()); 2402 EXPECT_TRUE(data2->at_write_eof());
2403 } 2403 }
(...skipping 3002 matching lines...) Expand 10 before | Expand all | Expand 10 after
5406 5406
5407 VerifyStreamsClosed(helper); 5407 VerifyStreamsClosed(helper);
5408 5408
5409 // Verify the SYN_REPLY. 5409 // Verify the SYN_REPLY.
5410 EXPECT_TRUE(response.headers != NULL); 5410 EXPECT_TRUE(response.headers != NULL);
5411 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); 5411 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine());
5412 } 5412 }
5413 } 5413 }
5414 5414
5415 } // namespace net 5415 } // namespace net
OLDNEW
« no previous file with comments | « chrome_frame/urlmon_url_request.cc ('k') | net/url_request/url_request_job_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698