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

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

Issue 1420783002: Add quotation marks around probability value in Alternative Services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years, 2 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 | « no previous file | net/quic/quic_network_transaction_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 8970 matching lines...) Expand 10 before | Expand all | Expand 10 after
8981 } 8981 }
8982 8982
8983 TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) { 8983 TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) {
8984 session_deps_.next_protos = SpdyNextProtos(); 8984 session_deps_.next_protos = SpdyNextProtos();
8985 session_deps_.use_alternative_services = true; 8985 session_deps_.use_alternative_services = true;
8986 8986
8987 MockRead data_reads[] = { 8987 MockRead data_reads[] = {
8988 MockRead("HTTP/1.1 200 OK\r\n"), 8988 MockRead("HTTP/1.1 200 OK\r\n"),
8989 MockRead("Alt-Svc: "), 8989 MockRead("Alt-Svc: "),
8990 MockRead(GetAlternateProtocolFromParam()), 8990 MockRead(GetAlternateProtocolFromParam()),
8991 MockRead("=\"www.example.com:443\";p=1.0,"), 8991 MockRead("=\"www.example.com:443\";p=\"1.0\","),
8992 MockRead("quic=\":1234\"\r\n\r\n"), 8992 MockRead("quic=\":1234\"\r\n\r\n"),
8993 MockRead("hello world"), 8993 MockRead("hello world"),
8994 MockRead(SYNCHRONOUS, OK), 8994 MockRead(SYNCHRONOUS, OK),
8995 }; 8995 };
8996 8996
8997 HttpRequestInfo request; 8997 HttpRequestInfo request;
8998 request.method = "GET"; 8998 request.method = "GET";
8999 request.url = GURL("http://www.example.org/"); 8999 request.url = GURL("http://www.example.org/");
9000 request.load_flags = 0; 9000 request.load_flags = 0;
9001 9001
(...skipping 5769 matching lines...) Expand 10 before | Expand all | Expand 10 after
14771 std::string response_data; 14771 std::string response_data;
14772 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 14772 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data));
14773 14773
14774 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)), 14774 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)),
14775 trans->GetTotalSentBytes()); 14775 trans->GetTotalSentBytes());
14776 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)), 14776 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)),
14777 trans->GetTotalReceivedBytes()); 14777 trans->GetTotalReceivedBytes());
14778 } 14778 }
14779 14779
14780 } // namespace net 14780 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698