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

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

Issue 6191001: Cleanup: Use AUTH_SCHEME enum instead of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge with trunk 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 | « net/socket_stream/socket_stream.cc ('k') | no next file » | 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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "net/base/address_list.h" 8 #include "net/base/address_list.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/net_log_unittest.h" 10 #include "net/base/net_log_unittest.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void AssertReadReturns(const char* data, int len); 77 void AssertReadReturns(const char* data, int len);
78 void AssertAsyncWriteSucceeds(const char* data, int len); 78 void AssertAsyncWriteSucceeds(const char* data, int len);
79 void AssertWriteReturns(const char* data, int len, int rv); 79 void AssertWriteReturns(const char* data, int len, int rv);
80 void AssertWriteLength(int len); 80 void AssertWriteLength(int len);
81 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len, 81 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len,
82 int num_reads); 82 int num_reads);
83 83
84 void AddAuthToCache() { 84 void AddAuthToCache() {
85 const string16 kFoo(ASCIIToUTF16("foo")); 85 const string16 kFoo(ASCIIToUTF16("foo"));
86 const string16 kBar(ASCIIToUTF16("bar")); 86 const string16 kBar(ASCIIToUTF16("bar"));
87 session_->auth_cache()->Add(GURL(kProxyUrl), "MyRealm1", "Basic", 87 session_->auth_cache()->Add(GURL(kProxyUrl),
88 "Basic realm=MyRealm1", kFoo, kBar, "/"); 88 "MyRealm1",
89 HttpAuth::AUTH_SCHEME_BASIC,
90 "Basic realm=MyRealm1",
91 kFoo,
92 kBar,
93 "/");
89 } 94 }
90 95
91 void Run(int steps) { 96 void Run(int steps) {
92 data_->StopAfter(steps); 97 data_->StopAfter(steps);
93 data_->Run(); 98 data_->Run();
94 } 99 }
95 100
96 scoped_ptr<SpdyProxyClientSocket> sock_; 101 scoped_ptr<SpdyProxyClientSocket> sock_;
97 TestCompletionCallback read_callback_; 102 TestCompletionCallback read_callback_;
98 TestCompletionCallback write_callback_; 103 TestCompletionCallback write_callback_;
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1)); 1158 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1));
1154 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_)); 1159 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_));
1155 1160
1156 sock_->Disconnect(); 1161 sock_->Disconnect();
1157 1162
1158 EXPECT_FALSE(sock_->IsConnected()); 1163 EXPECT_FALSE(sock_->IsConnected());
1159 EXPECT_FALSE(read_callback_.have_result()); 1164 EXPECT_FALSE(read_callback_.have_result());
1160 } 1165 }
1161 1166
1162 } // namespace net 1167 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698