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

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

Issue 1407643005: Add quotation marks around probability value in Alternative Services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. 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 9568 matching lines...) Expand 10 before | Expand all | Expand 10 after
9579 } 9579 }
9580 9580
9581 TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) { 9581 TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) {
9582 session_deps_.next_protos = SpdyNextProtos(); 9582 session_deps_.next_protos = SpdyNextProtos();
9583 session_deps_.use_alternative_services = true; 9583 session_deps_.use_alternative_services = true;
9584 9584
9585 MockRead data_reads[] = { 9585 MockRead data_reads[] = {
9586 MockRead("HTTP/1.1 200 OK\r\n"), 9586 MockRead("HTTP/1.1 200 OK\r\n"),
9587 MockRead("Alt-Svc: "), 9587 MockRead("Alt-Svc: "),
9588 MockRead(GetAlternateProtocolFromParam()), 9588 MockRead(GetAlternateProtocolFromParam()),
9589 MockRead("=\"www.example.com:443\";p=1.0,"), 9589 MockRead("=\"www.example.com:443\";p=\"1.0\","),
9590 MockRead("quic=\":1234\"\r\n\r\n"), 9590 MockRead("quic=\":1234\"\r\n\r\n"),
9591 MockRead("hello world"), 9591 MockRead("hello world"),
9592 MockRead(SYNCHRONOUS, OK), 9592 MockRead(SYNCHRONOUS, OK),
9593 }; 9593 };
9594 9594
9595 HttpRequestInfo request; 9595 HttpRequestInfo request;
9596 request.method = "GET"; 9596 request.method = "GET";
9597 request.url = GURL("http://www.example.org/"); 9597 request.url = GURL("http://www.example.org/");
9598 request.load_flags = 0; 9598 request.load_flags = 0;
9599 9599
(...skipping 5766 matching lines...) Expand 10 before | Expand all | Expand 10 after
15366 std::string response_data; 15366 std::string response_data;
15367 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 15367 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data));
15368 15368
15369 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)), 15369 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)),
15370 trans->GetTotalSentBytes()); 15370 trans->GetTotalSentBytes());
15371 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)), 15371 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)),
15372 trans->GetTotalReceivedBytes()); 15372 trans->GetTotalReceivedBytes());
15373 } 15373 }
15374 15374
15375 } // namespace net 15375 } // 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