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_session_spdy3_unittest.cc

Issue 11830032: Make all net targets build on Win64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/spdy/spdy_session_spdy2_unittest.cc ('k') | net/third_party/nss/ssl.gyp » ('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 (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 "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "net/base/cert_test_util.h" 7 #include "net/base/cert_test_util.h"
8 #include "net/base/host_cache.h" 8 #include "net/base/host_cache.h"
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/base/net_log_unittest.h" 10 #include "net/base/net_log_unittest.h"
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 // settings frame setting max concurrent streams to 2. Have the callback 660 // settings frame setting max concurrent streams to 2. Have the callback
661 // release the stream, which releases its reference (the last) to the session. 661 // release the stream, which releases its reference (the last) to the session.
662 // Make sure nothing blows up. 662 // Make sure nothing blows up.
663 // http://crbug.com/57331 663 // http://crbug.com/57331
664 TEST_F(SpdySessionSpdy3Test, OnSettings) { 664 TEST_F(SpdySessionSpdy3Test, OnSettings) {
665 SpdySessionDependencies session_deps; 665 SpdySessionDependencies session_deps;
666 session_deps.host_resolver->set_synchronous_mode(true); 666 session_deps.host_resolver->set_synchronous_mode(true);
667 667
668 SettingsMap new_settings; 668 SettingsMap new_settings;
669 const SpdySettingsIds kSpdySettingsIds1 = SETTINGS_MAX_CONCURRENT_STREAMS; 669 const SpdySettingsIds kSpdySettingsIds1 = SETTINGS_MAX_CONCURRENT_STREAMS;
670 const size_t max_concurrent_streams = 2; 670 const uint32 max_concurrent_streams = 2;
671 new_settings[kSpdySettingsIds1] = 671 new_settings[kSpdySettingsIds1] =
672 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams); 672 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, max_concurrent_streams);
673 673
674 // Set up the socket so we read a SETTINGS frame that raises max concurrent 674 // Set up the socket so we read a SETTINGS frame that raises max concurrent
675 // streams to 2. 675 // streams to 2.
676 MockConnect connect_data(SYNCHRONOUS, OK); 676 MockConnect connect_data(SYNCHRONOUS, OK);
677 scoped_ptr<SpdyFrame> settings_frame(ConstructSpdySettings(new_settings)); 677 scoped_ptr<SpdyFrame> settings_frame(ConstructSpdySettings(new_settings));
678 MockRead reads[] = { 678 MockRead reads[] = {
679 CreateMockRead(*settings_frame), 679 CreateMockRead(*settings_frame),
680 MockRead(SYNCHRONOUS, 0, 0) // EOF 680 MockRead(SYNCHRONOUS, 0, 0) // EOF
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 BoundNetLog())); 1914 BoundNetLog()));
1915 1915
1916 EXPECT_EQ(OK, session->InitializeWithSocket(connection.release(), false, OK)); 1916 EXPECT_EQ(OK, session->InitializeWithSocket(connection.release(), false, OK));
1917 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org")); 1917 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org"));
1918 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org")); 1918 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org"));
1919 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.example.com")); 1919 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.example.com"));
1920 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com")); 1920 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com"));
1921 } 1921 }
1922 1922
1923 } // namespace net 1923 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/third_party/nss/ssl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698