OLD | NEW |
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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 static int g_delta_seconds = 0; | 24 static int g_delta_seconds = 0; |
25 base::TimeTicks TheNearFuture() { | 25 base::TimeTicks TheNearFuture() { |
26 return base::TimeTicks::Now() + base::TimeDelta::FromSeconds(g_delta_seconds); | 26 return base::TimeTicks::Now() + base::TimeDelta::FromSeconds(g_delta_seconds); |
27 } | 27 } |
28 | 28 |
29 class ClosingDelegate : public SpdyStream::Delegate { | 29 class ClosingDelegate : public SpdyStream::Delegate { |
30 public: | 30 public: |
31 ClosingDelegate(SpdyStream* stream) : stream_(stream) {} | 31 explicit ClosingDelegate(SpdyStream* stream) : stream_(stream) {} |
32 | 32 |
33 // SpdyStream::Delegate implementation: | 33 // SpdyStream::Delegate implementation: |
34 virtual bool OnSendHeadersComplete(int status) OVERRIDE { | 34 virtual bool OnSendHeadersComplete(int status) OVERRIDE { |
35 return true; | 35 return true; |
36 } | 36 } |
37 virtual int OnSendBody() OVERRIDE { | 37 virtual int OnSendBody() OVERRIDE { |
38 return OK; | 38 return OK; |
39 } | 39 } |
40 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE { | 40 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE { |
41 return OK; | 41 return OK; |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |