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

Side by Side Diff: net/http/http_network_layer_unittest.cc

Issue 1072423005: Set network_accessed earlier, when network transaction creates stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't break build on iOS Created 5 years, 7 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
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/http_network_transaction.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) 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 "net/http/http_network_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "net/cert/mock_cert_verifier.h" 9 #include "net/cert/mock_cert_verifier.h"
10 #include "net/dns/mock_host_resolver.h" 10 #include "net/dns/mock_host_resolver.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 "Foo/1.0"); 388 "Foo/1.0");
389 request_info.load_flags = LOAD_NORMAL; 389 request_info.load_flags = LOAD_NORMAL;
390 390
391 scoped_ptr<HttpTransaction> trans; 391 scoped_ptr<HttpTransaction> trans;
392 int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans); 392 int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans);
393 EXPECT_EQ(OK, rv); 393 EXPECT_EQ(OK, rv);
394 394
395 rv = trans->Start(&request_info, callback.callback(), BoundNetLog()); 395 rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); 396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv));
397 397
398 // If the response info is null, that means that any consumer won't 398 // network_accessed is true; the HTTP stack did try to make a connection.
399 // see the network accessed bit set. 399 EXPECT_TRUE(trans->GetResponseInfo()->network_accessed);
400 EXPECT_EQ(NULL, trans->GetResponseInfo());
401 } 400 }
402 401
403 } // namespace 402 } // namespace
404 403
405 } // namespace net 404 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698