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

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

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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 | « net/http/http_cache_unittest.cc ('k') | net/http/http_network_transaction.h » ('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) 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/base/mock_host_resolver.h" 5 #include "net/base/mock_host_resolver.h"
6 #include "net/base/net_log.h"
6 #include "net/base/ssl_config_service_defaults.h" 7 #include "net/base/ssl_config_service_defaults.h"
7 #include "net/http/http_network_layer.h" 8 #include "net/http/http_network_layer.h"
8 #include "net/http/http_transaction_unittest.h" 9 #include "net/http/http_transaction_unittest.h"
9 #include "net/proxy/proxy_service.h" 10 #include "net/proxy/proxy_service.h"
10 #include "net/socket/socket_test_util.h" 11 #include "net/socket/socket_test_util.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 13 #include "testing/platform_test.h"
13 14
14 class HttpNetworkLayerTest : public PlatformTest { 15 class HttpNetworkLayerTest : public PlatformTest {
15 }; 16 };
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 scoped_ptr<net::HttpTransaction> trans; 78 scoped_ptr<net::HttpTransaction> trans;
78 int rv = factory.CreateTransaction(&trans); 79 int rv = factory.CreateTransaction(&trans);
79 EXPECT_EQ(net::OK, rv); 80 EXPECT_EQ(net::OK, rv);
80 81
81 net::HttpRequestInfo request_info; 82 net::HttpRequestInfo request_info;
82 request_info.url = GURL("http://www.google.com/"); 83 request_info.url = GURL("http://www.google.com/");
83 request_info.method = "GET"; 84 request_info.method = "GET";
84 request_info.user_agent = "Foo/1.0"; 85 request_info.user_agent = "Foo/1.0";
85 request_info.load_flags = net::LOAD_NORMAL; 86 request_info.load_flags = net::LOAD_NORMAL;
86 87
87 rv = trans->Start(&request_info, &callback, NULL); 88 rv = trans->Start(&request_info, &callback, net::BoundNetLog());
88 if (rv == net::ERR_IO_PENDING) 89 if (rv == net::ERR_IO_PENDING)
89 rv = callback.WaitForResult(); 90 rv = callback.WaitForResult();
90 ASSERT_EQ(net::OK, rv); 91 ASSERT_EQ(net::OK, rv);
91 92
92 std::string contents; 93 std::string contents;
93 rv = ReadTransaction(trans.get(), &contents); 94 rv = ReadTransaction(trans.get(), &contents);
94 EXPECT_EQ(net::OK, rv); 95 EXPECT_EQ(net::OK, rv);
95 EXPECT_EQ("hello world", contents); 96 EXPECT_EQ("hello world", contents);
96 } 97 }
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698