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

Side by Side Diff: net/http/http_pipelined_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 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 BoundNetLog())); 596 BoundNetLog()));
597 auth_handler_factory_->AddMockHandler(mock_auth, HttpAuth::AUTH_SERVER); 597 auth_handler_factory_->AddMockHandler(mock_auth, HttpAuth::AUTH_SERVER);
598 598
599 HttpNetworkTransaction transaction(DEFAULT_PRIORITY, session_.get()); 599 HttpNetworkTransaction transaction(DEFAULT_PRIORITY, session_.get());
600 EXPECT_EQ(ERR_IO_PENDING, 600 EXPECT_EQ(ERR_IO_PENDING,
601 transaction.Start(GetRequestInfo("one.html"), 601 transaction.Start(GetRequestInfo("one.html"),
602 callback_.callback(), 602 callback_.callback(),
603 BoundNetLog())); 603 BoundNetLog()));
604 EXPECT_EQ(OK, callback_.WaitForResult()); 604 EXPECT_EQ(OK, callback_.WaitForResult());
605 605
606 AuthCredentials credentials(ASCIIToUTF16("user"), ASCIIToUTF16("pass")); 606 AuthCredentials credentials(base::ASCIIToUTF16("user"),
607 base::ASCIIToUTF16("pass"));
607 EXPECT_EQ(OK, transaction.RestartWithAuth(credentials, callback_.callback())); 608 EXPECT_EQ(OK, transaction.RestartWithAuth(credentials, callback_.callback()));
608 609
609 ExpectResponse("one.html", transaction, SYNCHRONOUS); 610 ExpectResponse("one.html", transaction, SYNCHRONOUS);
610 } 611 }
611 612
612 TEST_F(HttpPipelinedNetworkTransactionTest, OldVersionDisablesPipelining) { 613 TEST_F(HttpPipelinedNetworkTransactionTest, OldVersionDisablesPipelining) {
613 Initialize(false); 614 Initialize(false);
614 615
615 MockWrite writes[] = { 616 MockWrite writes[] = {
616 MockWrite(SYNCHRONOUS, 0, "GET /pipelined.html HTTP/1.1\r\n" 617 MockWrite(SYNCHRONOUS, 0, "GET /pipelined.html HTTP/1.1\r\n"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 EXPECT_EQ(ERR_PIPELINE_EVICTION, two_callback.WaitForResult()); 1027 EXPECT_EQ(ERR_PIPELINE_EVICTION, two_callback.WaitForResult());
1027 two_transaction.reset(); 1028 two_transaction.reset();
1028 EXPECT_EQ(ERR_PIPELINE_EVICTION, three_callback.WaitForResult()); 1029 EXPECT_EQ(ERR_PIPELINE_EVICTION, three_callback.WaitForResult());
1029 three_transaction.reset(); 1030 three_transaction.reset();
1030 EXPECT_EQ(ERR_PIPELINE_EVICTION, four_callback.WaitForResult()); 1031 EXPECT_EQ(ERR_PIPELINE_EVICTION, four_callback.WaitForResult());
1031 } 1032 }
1032 1033
1033 } // anonymous namespace 1034 } // anonymous namespace
1034 1035
1035 } // namespace net 1036 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698