| 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 <memory> | 5 #include <memory> |
| 6 #include <ostream> | 6 #include <ostream> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 // In order for a new QUIC session to be established via alternate-protocol | 1138 // In order for a new QUIC session to be established via alternate-protocol |
| 1139 // without racing an HTTP connection, we need the host resolution to happen | 1139 // without racing an HTTP connection, we need the host resolution to happen |
| 1140 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1140 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1141 // connection to the the server, in this test we require confirmation | 1141 // connection to the the server, in this test we require confirmation |
| 1142 // before encrypting so the HTTP job will still start. | 1142 // before encrypting so the HTTP job will still start. |
| 1143 host_resolver_.set_synchronous_mode(true); | 1143 host_resolver_.set_synchronous_mode(true); |
| 1144 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1144 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1145 ""); | 1145 ""); |
| 1146 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1146 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1147 AddressList address; | 1147 AddressList address; |
| 1148 std::unique_ptr<HostResolver::Request> request; |
| 1148 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1149 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1149 nullptr, net_log_.bound()); | 1150 &request, net_log_.bound()); |
| 1150 | 1151 |
| 1151 CreateSession(); | 1152 CreateSession(); |
| 1152 session_->quic_stream_factory()->set_require_confirmation(true); | 1153 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1153 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1154 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1154 | 1155 |
| 1155 std::unique_ptr<HttpNetworkTransaction> trans( | 1156 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1156 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1157 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1157 TestCompletionCallback callback; | 1158 TestCompletionCallback callback; |
| 1158 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1159 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1159 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1160 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 mock_quic_data.AddSocketDataToFactory(&socket_factory_); | 1685 mock_quic_data.AddSocketDataToFactory(&socket_factory_); |
| 1685 | 1686 |
| 1686 // In order for a new QUIC session to be established via alternate-protocol | 1687 // In order for a new QUIC session to be established via alternate-protocol |
| 1687 // without racing an HTTP connection, we need the host resolution to happen | 1688 // without racing an HTTP connection, we need the host resolution to happen |
| 1688 // synchronously. | 1689 // synchronously. |
| 1689 host_resolver_.set_synchronous_mode(true); | 1690 host_resolver_.set_synchronous_mode(true); |
| 1690 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1691 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1691 ""); | 1692 ""); |
| 1692 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1693 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1693 AddressList address; | 1694 AddressList address; |
| 1695 std::unique_ptr<HostResolver::Request> request; |
| 1694 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1696 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1695 nullptr, net_log_.bound()); | 1697 &request, net_log_.bound()); |
| 1696 | 1698 |
| 1697 AddHangingNonAlternateProtocolSocketData(); | 1699 AddHangingNonAlternateProtocolSocketData(); |
| 1698 CreateSession(); | 1700 CreateSession(); |
| 1699 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1701 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1700 SendRequestAndExpectQuicResponse("hello!"); | 1702 SendRequestAndExpectQuicResponse("hello!"); |
| 1701 } | 1703 } |
| 1702 | 1704 |
| 1703 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithProxy) { | 1705 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithProxy) { |
| 1704 proxy_service_ = ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"); | 1706 proxy_service_ = ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"); |
| 1705 | 1707 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1719 socket_factory_.AddSocketDataProvider(&http_data); | 1721 socket_factory_.AddSocketDataProvider(&http_data); |
| 1720 | 1722 |
| 1721 // In order for a new QUIC session to be established via alternate-protocol | 1723 // In order for a new QUIC session to be established via alternate-protocol |
| 1722 // without racing an HTTP connection, we need the host resolution to happen | 1724 // without racing an HTTP connection, we need the host resolution to happen |
| 1723 // synchronously. | 1725 // synchronously. |
| 1724 host_resolver_.set_synchronous_mode(true); | 1726 host_resolver_.set_synchronous_mode(true); |
| 1725 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1727 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1726 ""); | 1728 ""); |
| 1727 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1729 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1728 AddressList address; | 1730 AddressList address; |
| 1731 std::unique_ptr<HostResolver::Request> request; |
| 1729 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1732 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1730 nullptr, net_log_.bound()); | 1733 &request, net_log_.bound()); |
| 1731 | 1734 |
| 1732 request_.url = GURL("http://mail.example.org/"); | 1735 request_.url = GURL("http://mail.example.org/"); |
| 1733 CreateSession(); | 1736 CreateSession(); |
| 1734 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1737 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1735 SendRequestAndExpectHttpResponse("hello world"); | 1738 SendRequestAndExpectHttpResponse("hello world"); |
| 1736 } | 1739 } |
| 1737 | 1740 |
| 1738 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithConfirmationRequired) { | 1741 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithConfirmationRequired) { |
| 1739 MockQuicData mock_quic_data; | 1742 MockQuicData mock_quic_data; |
| 1740 mock_quic_data.AddWrite(ConstructClientRequestHeadersPacket( | 1743 mock_quic_data.AddWrite(ConstructClientRequestHeadersPacket( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1755 // In order for a new QUIC session to be established via alternate-protocol | 1758 // In order for a new QUIC session to be established via alternate-protocol |
| 1756 // without racing an HTTP connection, we need the host resolution to happen | 1759 // without racing an HTTP connection, we need the host resolution to happen |
| 1757 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1760 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1758 // connection to the the server, in this test we require confirmation | 1761 // connection to the the server, in this test we require confirmation |
| 1759 // before encrypting so the HTTP job will still start. | 1762 // before encrypting so the HTTP job will still start. |
| 1760 host_resolver_.set_synchronous_mode(true); | 1763 host_resolver_.set_synchronous_mode(true); |
| 1761 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1764 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1762 ""); | 1765 ""); |
| 1763 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1766 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1764 AddressList address; | 1767 AddressList address; |
| 1768 std::unique_ptr<HostResolver::Request> request; |
| 1765 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1769 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1766 nullptr, net_log_.bound()); | 1770 &request, net_log_.bound()); |
| 1767 | 1771 |
| 1768 CreateSession(); | 1772 CreateSession(); |
| 1769 session_->quic_stream_factory()->set_require_confirmation(true); | 1773 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1770 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1774 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1771 | 1775 |
| 1772 std::unique_ptr<HttpNetworkTransaction> trans( | 1776 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1773 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1777 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1774 TestCompletionCallback callback; | 1778 TestCompletionCallback callback; |
| 1775 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1779 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1776 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1780 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1801 // In order for a new QUIC session to be established via alternate-protocol | 1805 // In order for a new QUIC session to be established via alternate-protocol |
| 1802 // without racing an HTTP connection, we need the host resolution to happen | 1806 // without racing an HTTP connection, we need the host resolution to happen |
| 1803 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1807 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1804 // connection to the the server, in this test we require confirmation | 1808 // connection to the the server, in this test we require confirmation |
| 1805 // before encrypting so the HTTP job will still start. | 1809 // before encrypting so the HTTP job will still start. |
| 1806 host_resolver_.set_synchronous_mode(true); | 1810 host_resolver_.set_synchronous_mode(true); |
| 1807 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1811 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1808 ""); | 1812 ""); |
| 1809 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1813 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1810 AddressList address; | 1814 AddressList address; |
| 1815 std::unique_ptr<HostResolver::Request> request; |
| 1811 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1816 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1812 nullptr, net_log_.bound()); | 1817 &request, net_log_.bound()); |
| 1813 | 1818 |
| 1814 CreateSession(); | 1819 CreateSession(); |
| 1815 session_->quic_stream_factory()->set_require_confirmation(true); | 1820 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1816 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1821 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1817 | 1822 |
| 1818 std::unique_ptr<HttpNetworkTransaction> trans( | 1823 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1819 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1824 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1820 TestCompletionCallback callback; | 1825 TestCompletionCallback callback; |
| 1821 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1826 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1822 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1827 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 // In order for a new QUIC session to be established via alternate-protocol | 1861 // In order for a new QUIC session to be established via alternate-protocol |
| 1857 // without racing an HTTP connection, we need the host resolution to happen | 1862 // without racing an HTTP connection, we need the host resolution to happen |
| 1858 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1863 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1859 // connection to the the server, in this test we require confirmation | 1864 // connection to the the server, in this test we require confirmation |
| 1860 // before encrypting so the HTTP job will still start. | 1865 // before encrypting so the HTTP job will still start. |
| 1861 host_resolver_.set_synchronous_mode(true); | 1866 host_resolver_.set_synchronous_mode(true); |
| 1862 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1867 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1863 ""); | 1868 ""); |
| 1864 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1869 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1865 AddressList address; | 1870 AddressList address; |
| 1871 std::unique_ptr<HostResolver::Request> request; |
| 1866 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1872 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1867 nullptr, net_log_.bound()); | 1873 &request, net_log_.bound()); |
| 1868 | 1874 |
| 1869 CreateSession(); | 1875 CreateSession(); |
| 1870 session_->quic_stream_factory()->set_require_confirmation(true); | 1876 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1871 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1877 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1872 | 1878 |
| 1873 std::unique_ptr<HttpNetworkTransaction> trans( | 1879 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1874 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1880 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1875 TestCompletionCallback callback; | 1881 TestCompletionCallback callback; |
| 1876 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1882 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1877 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1883 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1907 // In order for a new QUIC session to be established via alternate-protocol | 1913 // In order for a new QUIC session to be established via alternate-protocol |
| 1908 // without racing an HTTP connection, we need the host resolution to happen | 1914 // without racing an HTTP connection, we need the host resolution to happen |
| 1909 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1915 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1910 // connection to the the server, in this test we require confirmation | 1916 // connection to the the server, in this test we require confirmation |
| 1911 // before encrypting so the HTTP job will still start. | 1917 // before encrypting so the HTTP job will still start. |
| 1912 host_resolver_.set_synchronous_mode(true); | 1918 host_resolver_.set_synchronous_mode(true); |
| 1913 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1919 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1914 ""); | 1920 ""); |
| 1915 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1921 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1916 AddressList address; | 1922 AddressList address; |
| 1923 std::unique_ptr<HostResolver::Request> request; |
| 1917 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1924 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1918 nullptr, net_log_.bound()); | 1925 &request, net_log_.bound()); |
| 1919 | 1926 |
| 1920 CreateSession(); | 1927 CreateSession(); |
| 1921 session_->quic_stream_factory()->set_require_confirmation(true); | 1928 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1922 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1929 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1923 | 1930 |
| 1924 std::unique_ptr<HttpNetworkTransaction> trans( | 1931 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1925 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1932 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1926 TestCompletionCallback callback; | 1933 TestCompletionCallback callback; |
| 1927 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1934 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1928 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1935 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1963 // In order for a new QUIC session to be established via alternate-protocol | 1970 // In order for a new QUIC session to be established via alternate-protocol |
| 1964 // without racing an HTTP connection, we need the host resolution to happen | 1971 // without racing an HTTP connection, we need the host resolution to happen |
| 1965 // synchronously. Of course, even though QUIC *could* perform a 0-RTT | 1972 // synchronously. Of course, even though QUIC *could* perform a 0-RTT |
| 1966 // connection to the the server, in this test we require confirmation | 1973 // connection to the the server, in this test we require confirmation |
| 1967 // before encrypting so the HTTP job will still start. | 1974 // before encrypting so the HTTP job will still start. |
| 1968 host_resolver_.set_synchronous_mode(true); | 1975 host_resolver_.set_synchronous_mode(true); |
| 1969 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 1976 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 1970 ""); | 1977 ""); |
| 1971 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 1978 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 1972 AddressList address; | 1979 AddressList address; |
| 1980 std::unique_ptr<HostResolver::Request> request; |
| 1973 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 1981 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 1974 nullptr, net_log_.bound()); | 1982 &request, net_log_.bound()); |
| 1975 | 1983 |
| 1976 CreateSession(); | 1984 CreateSession(); |
| 1977 session_->quic_stream_factory()->set_require_confirmation(true); | 1985 session_->quic_stream_factory()->set_require_confirmation(true); |
| 1978 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1986 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1979 | 1987 |
| 1980 std::unique_ptr<HttpNetworkTransaction> trans( | 1988 std::unique_ptr<HttpNetworkTransaction> trans( |
| 1981 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); | 1989 new HttpNetworkTransaction(DEFAULT_PRIORITY, session_.get())); |
| 1982 TestCompletionCallback callback; | 1990 TestCompletionCallback callback; |
| 1983 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); | 1991 int rv = trans->Start(&request_, callback.callback(), net_log_.bound()); |
| 1984 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 1992 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 socket_factory_.AddSSLSocketDataProvider(&ssl_data_); | 2199 socket_factory_.AddSSLSocketDataProvider(&ssl_data_); |
| 2192 | 2200 |
| 2193 // In order for a new QUIC session to be established via alternate-protocol | 2201 // In order for a new QUIC session to be established via alternate-protocol |
| 2194 // without racing an HTTP connection, we need the host resolution to happen | 2202 // without racing an HTTP connection, we need the host resolution to happen |
| 2195 // synchronously. | 2203 // synchronously. |
| 2196 host_resolver_.set_synchronous_mode(true); | 2204 host_resolver_.set_synchronous_mode(true); |
| 2197 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", | 2205 host_resolver_.rules()->AddIPLiteralRule("mail.example.org", "192.168.0.1", |
| 2198 ""); | 2206 ""); |
| 2199 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); | 2207 HostResolver::RequestInfo info(HostPortPair("mail.example.org", 443)); |
| 2200 AddressList address; | 2208 AddressList address; |
| 2209 std::unique_ptr<HostResolver::Request> request; |
| 2201 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), | 2210 host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(), |
| 2202 nullptr, net_log_.bound()); | 2211 &request, net_log_.bound()); |
| 2203 | 2212 |
| 2204 CreateSession(); | 2213 CreateSession(); |
| 2205 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 2214 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 2206 SendRequestAndExpectHttpResponse("hello world"); | 2215 SendRequestAndExpectHttpResponse("hello world"); |
| 2207 } | 2216 } |
| 2208 | 2217 |
| 2209 TEST_P(QuicNetworkTransactionTest, SecureResourceOverSecureQuic) { | 2218 TEST_P(QuicNetworkTransactionTest, SecureResourceOverSecureQuic) { |
| 2210 client_maker_.set_hostname("www.example.org"); | 2219 client_maker_.set_hostname("www.example.org"); |
| 2211 EXPECT_FALSE( | 2220 EXPECT_FALSE( |
| 2212 test_socket_performance_watcher_factory_.rtt_notification_received()); | 2221 test_socket_performance_watcher_factory_.rtt_notification_received()); |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2781 AddHangingSocketData(); | 2790 AddHangingSocketData(); |
| 2782 | 2791 |
| 2783 SendRequestAndExpectQuicResponse(origin1_); | 2792 SendRequestAndExpectQuicResponse(origin1_); |
| 2784 SendRequestAndExpectQuicResponse(origin2_); | 2793 SendRequestAndExpectQuicResponse(origin2_); |
| 2785 | 2794 |
| 2786 EXPECT_TRUE(AllDataConsumed()); | 2795 EXPECT_TRUE(AllDataConsumed()); |
| 2787 } | 2796 } |
| 2788 | 2797 |
| 2789 } // namespace test | 2798 } // namespace test |
| 2790 } // namespace net | 2799 } // namespace net |
| OLD | NEW |