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

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

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 4987 matching lines...) Expand 10 before | Expand all | Expand 10 after
4998 ASSERT_TRUE(response_start->headers.get() != NULL); 4998 ASSERT_TRUE(response_start->headers.get() != NULL);
4999 EXPECT_EQ(401, response_start->headers->response_code()); 4999 EXPECT_EQ(401, response_start->headers->response_code());
5000 EXPECT_TRUE(response_start->was_fetched_via_spdy); 5000 EXPECT_TRUE(response_start->was_fetched_via_spdy);
5001 AuthChallengeInfo* auth_challenge = response_start->auth_challenge.get(); 5001 AuthChallengeInfo* auth_challenge = response_start->auth_challenge.get();
5002 ASSERT_TRUE(auth_challenge != NULL); 5002 ASSERT_TRUE(auth_challenge != NULL);
5003 EXPECT_FALSE(auth_challenge->is_proxy); 5003 EXPECT_FALSE(auth_challenge->is_proxy);
5004 EXPECT_EQ("basic", auth_challenge->scheme); 5004 EXPECT_EQ("basic", auth_challenge->scheme);
5005 EXPECT_EQ("MyRealm", auth_challenge->realm); 5005 EXPECT_EQ("MyRealm", auth_challenge->realm);
5006 5006
5007 // Restart with a username/password. 5007 // Restart with a username/password.
5008 AuthCredentials credentials(ASCIIToUTF16("foo"), ASCIIToUTF16("bar")); 5008 AuthCredentials credentials(base::ASCIIToUTF16("foo"),
5009 base::ASCIIToUTF16("bar"));
5009 TestCompletionCallback callback_restart; 5010 TestCompletionCallback callback_restart;
5010 const int rv_restart = trans->RestartWithAuth( 5011 const int rv_restart = trans->RestartWithAuth(
5011 credentials, callback_restart.callback()); 5012 credentials, callback_restart.callback());
5012 EXPECT_EQ(ERR_IO_PENDING, rv_restart); 5013 EXPECT_EQ(ERR_IO_PENDING, rv_restart);
5013 const int rv_restart_complete = callback_restart.WaitForResult(); 5014 const int rv_restart_complete = callback_restart.WaitForResult();
5014 EXPECT_EQ(OK, rv_restart_complete); 5015 EXPECT_EQ(OK, rv_restart_complete);
5015 // TODO(cbentzel): This is actually the same response object as before, but 5016 // TODO(cbentzel): This is actually the same response object as before, but
5016 // data has changed. 5017 // data has changed.
5017 const HttpResponseInfo* const response_restart = trans->GetResponseInfo(); 5018 const HttpResponseInfo* const response_restart = trans->GetResponseInfo();
5018 ASSERT_TRUE(response_restart != NULL); 5019 ASSERT_TRUE(response_restart != NULL);
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
6466 // since we're send-stalled. 6467 // since we're send-stalled.
6467 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control()); 6468 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control());
6468 6469
6469 // Read in WINDOW_UPDATE or SETTINGS frame. 6470 // Read in WINDOW_UPDATE or SETTINGS frame.
6470 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7); 6471 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7);
6471 rv = callback.WaitForResult(); 6472 rv = callback.WaitForResult();
6472 helper.VerifyDataConsumed(); 6473 helper.VerifyDataConsumed();
6473 } 6474 }
6474 6475
6475 } // namespace net 6476 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream_unittest.cc ('k') | net/spdy/spdy_proxy_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698