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

Side by Side Diff: net/quic/quic_network_transaction_unittest.cc

Issue 13190010: Switch the QUIC alternate protocol string from "quic/1" to "quic", since QUIC can do its own versio… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/http/http_stream_factory_impl_job.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) 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/base/mock_cert_verifier.h" 8 #include "net/base/mock_cert_verifier.h"
9 #include "net/base/test_completion_callback.h" 9 #include "net/base/test_completion_callback.h"
10 #include "net/dns/mock_host_resolver.h" 10 #include "net/dns/mock_host_resolver.h"
(...skipping 23 matching lines...) Expand all
34 #include "net/ssl/ssl_config_service_defaults.h" 34 #include "net/ssl/ssl_config_service_defaults.h"
35 #include "testing/gtest/include/gtest/gtest.h" 35 #include "testing/gtest/include/gtest/gtest.h"
36 #include "testing/platform_test.h" 36 #include "testing/platform_test.h"
37 37
38 //----------------------------------------------------------------------------- 38 //-----------------------------------------------------------------------------
39 39
40 namespace { 40 namespace {
41 41
42 // This is the expected return from a current server advertising QUIC. 42 // This is the expected return from a current server advertising QUIC.
43 static const char kQuicAlternateProtocolHttpHeader[] = 43 static const char kQuicAlternateProtocolHttpHeader[] =
44 "Alternate-Protocol: 443:quic/1\r\n\r\n"; 44 "Alternate-Protocol: 443:quic\r\n\r\n";
45 45
46 // Returns a vector of NPN protocol strings for negotiating QUIC. 46 // Returns a vector of NPN protocol strings for negotiating QUIC.
47 std::vector<std::string> QuicNextProtos() { 47 std::vector<std::string> QuicNextProtos() {
48 std::vector<std::string> protos; 48 std::vector<std::string> protos;
49 protos.push_back("http/1.1"); 49 protos.push_back("http/1.1");
50 protos.push_back("quic/1"); 50 protos.push_back("quic");
51 return protos; 51 return protos;
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 namespace net { 56 namespace net {
57 namespace test { 57 namespace test {
58 58
59 class QuicNetworkTransactionTest : public PlatformTest { 59 class QuicNetworkTransactionTest : public PlatformTest {
60 protected: 60 protected:
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 ASSERT_TRUE(response->headers != NULL); 518 ASSERT_TRUE(response->headers != NULL);
519 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 519 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
520 EXPECT_FALSE(response->was_fetched_via_spdy); 520 EXPECT_FALSE(response->was_fetched_via_spdy);
521 521
522 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 522 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
523 EXPECT_EQ("hello!", response_data); 523 EXPECT_EQ("hello!", response_data);
524 } 524 }
525 525
526 } // namespace test 526 } // namespace test
527 } // namespace net 527 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698