Lines Matching refs:MockRead
283 const MockRead* read_failure);
290 const MockRead* read_failure,
374 SimpleGetHelperResult SimpleGetHelper(MockRead data_reads[],
381 int64 ReadsSize(MockRead data_reads[], size_t reads_count) {
388 void ConnectStatusHelperWithExpectedStatus(const MockRead& status,
391 void ConnectStatusHelper(const MockRead& status);
646 MockRead data_reads[] = {
647 MockRead("HTTP/1.0 200 OK\r\n\r\n"),
648 MockRead("hello world"),
649 MockRead(SYNCHRONOUS, OK),
662 MockRead data_reads[] = {
663 MockRead("hello world"),
664 MockRead(SYNCHRONOUS, OK),
677 MockRead data_reads[] = {
678 MockRead("xxxHTTP/1.0 404 Not Found\nServer: blah\n\nDATA"),
679 MockRead(SYNCHRONOUS, OK),
692 MockRead data_reads[] = {
693 MockRead("\n\nQJHTTP/1.0 404 Not Found\nServer: blah\n\nDATA"),
694 MockRead(SYNCHRONOUS, OK),
707 MockRead data_reads[] = {
708 MockRead("xxxxxHTTP/1.1 404 Not Found\nServer: blah"),
709 MockRead(SYNCHRONOUS, OK),
722 MockRead data_reads[] = {
723 MockRead("\n"),
724 MockRead("\n"),
725 MockRead("Q"),
726 MockRead("J"),
727 MockRead("HTTP/1.0 404 Not Found\nServer: blah\n\nDATA"),
728 MockRead(SYNCHRONOUS, OK),
741 MockRead data_reads[] = {
742 MockRead("HTT"),
743 MockRead(SYNCHRONOUS, OK),
759 MockRead data_reads[] = {
760 MockRead("HTTP/1.1 204 No Content\r\n\r\n"),
761 MockRead(junk), // Should not be read!!
762 MockRead(SYNCHRONOUS, OK),
779 MockRead data_reads[] = {
780 MockRead("HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n"),
781 MockRead("5\r\nHello\r\n"),
782 MockRead("1\r\n"),
783 MockRead(" \r\n"),
784 MockRead("5\r\nworld\r\n"),
785 MockRead(last_read.data()),
786 MockRead(SYNCHRONOUS, OK),
802 MockRead data_reads[] = {
803 MockRead("HTTP/1.1 200 OK\r\n"),
804 MockRead("Content-Length: 10\r\n"),
805 MockRead("Content-Length: 5\r\n\r\n"),
814 MockRead data_reads[] = {
815 MockRead("HTTP/1.1 200 OK\r\n"),
816 MockRead("Content-Length: 5\r\n"),
817 MockRead("Content-Length: 5\r\n\r\n"),
818 MockRead("Hello"),
831 MockRead data_reads[] = {
832 MockRead("HTTP/1.1 200 OK\r\n"),
833 MockRead("Content-Length: 5\r\n"),
834 MockRead("Content-Length: 5\r\n"),
835 MockRead("Content-Length: 5\r\n\r\n"),
836 MockRead("Hello"),
846 MockRead data_reads[] = {
847 MockRead("HTTP/1.0 200 OK\r\n"),
848 MockRead("Content-Length: 5\r\n"),
849 MockRead("Content-Length: 5\r\n"),
850 MockRead("Content-Length: 5\r\n\r\n"),
851 MockRead("Hello"),
861 MockRead data_reads[] = {
862 MockRead("HTTP/1.1 200 OK\r\n"),
863 MockRead("Content-Length: 10\r\n"),
864 MockRead("Content-Length: 10\r\n"),
865 MockRead("Content-Length: 5\r\n\r\n"),
875 MockRead data_reads[] = {
876 MockRead("HTTP/1.1 200 OK\r\n"),
877 MockRead("Content-Length: 666\r\n"),
878 MockRead("Content-Length: 1337\r\n"),
879 MockRead("Transfer-Encoding: chunked\r\n\r\n"),
880 MockRead("5\r\nHello\r\n"),
881 MockRead("1\r\n"),
882 MockRead(" \r\n"),
883 MockRead("5\r\nworld\r\n"),
884 MockRead("0\r\n\r\nHTTP/1.1 200 OK\r\n"),
885 MockRead(SYNCHRONOUS, OK),
898 MockRead data_reads[] = {
899 MockRead("HTTP/1.1 200 OK\r\n"),
900 MockRead("Content-Disposition: attachment;filename=\"salutations.txt\"r\n"),
901 MockRead("Content-Length: 5\r\n\r\n"),
902 MockRead("Hello"),
914 MockRead data_reads[] = {
915 MockRead("HTTP/1.1 200 OK\r\n"),
916 MockRead("Content-Disposition: attachment;filename=\"greetings.txt\"r\n"),
917 MockRead("Content-Disposition: attachment;filename=\"greetings.txt\"r\n"),
918 MockRead("Content-Length: 5\r\n\r\n"),
919 MockRead("Hello"),
930 MockRead data_reads[] = {
931 MockRead("HTTP/1.1 200 OK\r\n"),
932 MockRead("Content-Disposition: attachment;filename=\"greetings.txt\"r\n"),
933 MockRead("Content-Disposition: attachment;filename=\"hi.txt\"r\n"),
934 MockRead("Content-Length: 5\r\n\r\n"),
935 MockRead("Hello"),
945 MockRead data_reads[] = {
946 MockRead("HTTP/1.1 302 Redirect\r\n"),
947 MockRead("Location: http://good.com/\r\n"),
948 MockRead("Location: http://good.com/\r\n"),
949 MockRead("Content-Length: 0\r\n\r\n"),
950 MockRead(SYNCHRONOUS, OK),
983 MockRead data_reads[] = {
984 MockRead("HTTP/1.1 302 Redirect\r\n"),
985 MockRead("Location: http://good.com/\r\n"),
986 MockRead("Location: http://evil.com/\r\n"),
987 MockRead("Content-Length: 0\r\n\r\n"),
988 MockRead(SYNCHRONOUS, OK),
1017 MockRead data_reads1[] = {
1018 MockRead("HTTP/1.1 404 Not Found\r\n"),
1019 MockRead("Server: Blah\r\n"),
1020 MockRead("Content-Length: 1234\r\n\r\n"),
1023 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
1066 MockRead data_reads[] = {
1067 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
1068 MockRead("hello"),
1069 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
1070 MockRead("world"),
1071 MockRead(SYNCHRONOUS, OK),
1126 MockRead data_reads[] = {
1127 MockRead("HTTP/1.0 100 Continue\r\n\r\n"),
1128 MockRead("HTTP/1.0 200 OK\r\n\r\n"),
1129 MockRead("hello world"),
1130 MockRead(SYNCHRONOUS, OK),
1168 MockRead data_reads[] = {
1169 MockRead("HTTP/1.1 102 Unspecified status code\r\n\r\n"
1171 MockRead("hello world"),
1172 MockRead(SYNCHRONOUS, OK),
1207 MockRead data_reads[] = {
1208 MockRead(SYNCHRONOUS, "HTTP/1.0 100 Continue\r\n"),
1209 MockRead(ASYNC, 0),
1238 MockRead data_reads[] = {
1239 MockRead(ASYNC, 0),
1255 const MockRead* read_failure) {
1276 MockRead data1_reads[] = {
1277 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
1278 MockRead("hello"),
1279 MockRead(ASYNC, OK),
1294 MockRead data2_reads[] = {
1295 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
1296 MockRead("world"),
1297 MockRead(ASYNC, OK),
1344 const MockRead* read_failure,
1379 std::vector<MockRead> data1_reads;
1384 data1_reads.push_back(MockRead(ASYNC, OK));
1399 std::vector<MockRead> data2_reads;
1407 data2_reads.push_back(MockRead(ASYNC, OK, 3));
1413 MockRead(ASYNC, kHttpResponse, strlen(kHttpResponse), 1));
1414 data2_reads.push_back(MockRead(ASYNC, kHttpData, strlen(kHttpData), 2));
1415 data2_reads.push_back(MockRead(ASYNC, OK, 3));
1469 MockRead read_failure(ASYNC, ERR_CONNECTION_RESET);
1474 MockRead read_failure(SYNCHRONOUS, OK); // EOF
1481 MockRead read_failure(SYNCHRONOUS,
1496 MockRead read_failure(ASYNC, ERR_CONNECTION_RESET);
1501 MockRead read_failure(SYNCHRONOUS, OK); // EOF
1506 MockRead read_failure(ASYNC, OK); // EOF
1513 MockRead read_failure(SYNCHRONOUS,
1529 MockRead read_failure(ASYNC, ERR_CONNECTION_RESET);
1534 MockRead read_failure(SYNCHRONOUS, OK); // EOF
1539 MockRead read_failure(ASYNC, OK); // EOF
1553 MockRead data_reads[] = {
1554 MockRead(ASYNC, ERR_CONNECTION_RESET),
1555 MockRead("HTTP/1.0 200 OK\r\n\r\n"), // Should not be used
1556 MockRead("hello world"),
1557 MockRead(SYNCHRONOUS, OK),
1584 MockRead data_reads[] = {
1585 MockRead(SYNCHRONOUS, OK), // EOF
1586 MockRead("HTTP/1.0 200 OK\r\n\r\n"), // Should not be used
1587 MockRead("hello world"),
1588 MockRead(SYNCHRONOUS, OK),
1612 MockRead data_reads[] = {
1613 MockRead("HTTP/1.0 200 OK\r\n"),
1614 MockRead("Content-Length: 5\r\n\r\n"),
1615 MockRead("hello"),
1616 MockRead(SYNCHRONOUS, 0),
1688 MockRead data_reads[] = {
1689 MockRead("HTTP/1.0 200 OK\r\n"),
1690 MockRead("Connection: keep-alive\r\n"),
1691 MockRead("Content-Length: 100\r\n\r\n"),
1692 MockRead("hello"),
1693 MockRead(SYNCHRONOUS, 0),
1729 MockRead data_reads[] = {
1730 MockRead("HTTP/1.0 200 OK\r\n"),
1731 MockRead("Connection: keep-alive\r\n"),
1732 MockRead("Content-Length: 100\r\n\r\n"),
1733 MockRead(SYNCHRONOUS, 0),
1772 MockRead data1_reads[] = {
1773 MockRead("HTTP/1.1 204 No Content\r\n\r\n"),
1774 MockRead("HTTP/1.1 205 Reset Content\r\n\r\n"),
1775 MockRead("HTTP/1.1 304 Not Modified\r\n\r\n"),
1776 MockRead("HTTP/1.1 302 Found\r\n"
1778 MockRead("HTTP/1.1 302 Found\r\n"
1781 MockRead("HTTP/1.1 301 Moved Permanently\r\n"
1783 MockRead("HTTP/1.1 301 Moved Permanently\r\n"
1786 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
1787 MockRead("hello"),
1792 MockRead data2_reads[] = {
1793 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
1886 MockRead data_reads1[] = {
1887 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
1890 MockRead("WWW-Authenticate: Basic invalid\r\n"), // Malformed.
1891 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
1892 MockRead("WWW-Authenticate: UNSUPPORTED realm=\"FOO\"\r\n"),
1893 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
1895 MockRead("Content-Length: 10000\r\n\r\n"),
1896 MockRead(SYNCHRONOUS, ERR_FAILED),
1909 MockRead data_reads2[] = {
1910 MockRead("HTTP/1.0 200 OK\r\n"),
1911 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
1912 MockRead("Content-Length: 100\r\n\r\n"),
1913 MockRead(SYNCHRONOUS, OK),
1985 MockRead data_reads[] = {
1986 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
1987 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
1988 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
1990 MockRead("Content-Length: 10000\r\n\r\n"),
1991 MockRead(SYNCHRONOUS, ERR_FAILED),
2038 MockRead data_reads1[] = {
2039 MockRead("HTTP/1.1 401 Unauthorized\r\n"),
2040 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2041 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2042 MockRead("Content-Length: 14\r\n\r\n"),
2043 MockRead("Unauthorized\r\n"),
2046 MockRead("HTTP/1.1 200 OK\r\n"),
2047 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2048 MockRead("Content-Length: 5\r\n\r\n"),
2049 MockRead("Hello"),
2054 MockRead data_reads2[] = {
2055 MockRead(SYNCHRONOUS, ERR_FAILED),
2136 MockRead data_reads1[] = {
2137 MockRead("HTTP/1.1 401 Unauthorized\r\n"),
2138 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2139 MockRead("Content-Length: 0\r\n\r\n"), // No response body.
2142 MockRead("HTTP/1.1 200 OK\r\n"),
2143 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2144 MockRead("Content-Length: 5\r\n\r\n"),
2145 MockRead("hello"),
2149 MockRead data_reads2[] = {
2150 MockRead(SYNCHRONOUS, ERR_FAILED),
2217 MockRead data_reads1[] = {
2218 MockRead("HTTP/1.1 401 Unauthorized\r\n"),
2219 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2220 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2222 MockRead("Content-Length: 5134\r\n\r\n"),
2223 MockRead(ASYNC, large_body_string.data(), large_body_string.size()),
2226 MockRead("HTTP/1.1 200 OK\r\n"),
2227 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2228 MockRead("Content-Length: 5\r\n\r\n"),
2229 MockRead("hello"),
2233 MockRead data_reads2[] = {
2234 MockRead(SYNCHRONOUS, ERR_FAILED),
2295 MockRead data_reads1[] = {
2296 MockRead("HTTP/1.1 401 Unauthorized\r\n"),
2297 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2298 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2299 MockRead("Content-Length: 14\r\n\r\n"),
2301 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
2302 MockRead("Unauthorized\r\n"),
2303 MockRead(SYNCHRONOUS, OK), // The server closes the connection.
2316 MockRead data_reads2[] = {
2317 MockRead("HTTP/1.1 200 OK\r\n"),
2318 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2319 MockRead("Content-Length: 5\r\n\r\n"),
2320 MockRead("hello"),
2395 MockRead data_reads1[] = {
2397 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
2398 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2399 MockRead("Proxy-Connection: close\r\n\r\n"),
2401 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
2403 MockRead("HTTP/1.1 200 OK\r\n"),
2404 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2405 MockRead("Content-Length: 5\r\n\r\n"),
2406 MockRead(SYNCHRONOUS, "hello"),
2510 MockRead data_reads1[] = {
2512 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
2513 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2514 MockRead("Content-Length: 10\r\n\r\n"),
2515 MockRead("0123456789"),
2518 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
2519 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2520 MockRead("Content-Length: 10\r\n\r\n"),
2522 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
2603 MockRead data_reads[] = {
2604 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
2605 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2606 MockRead("Content-Length: 10\r\n\r\n"),
2607 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
2657 MockRead data_reads1[] = {
2658 MockRead("HTTP/1.0 407 Proxy Auth required\r\n"),
2659 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2661 MockRead("Content-Length: 10000\r\n\r\n"),
2662 MockRead(SYNCHRONOUS, ERR_FAILED),
2707 MockRead data_reads1[] = {
2708 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
2710 MockRead("HTTP/1.1 407 Unauthorized\r\n"),
2711 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
2712 MockRead("\r\n"),
2713 MockRead(SYNCHRONOUS, OK),
2777 MockRead data_reads1[] = {
2778 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
2780 MockRead("HTTP/1.1 200 OK\r\n"),
2781 MockRead("Content-Length: 1\r\n\r\n"),
2782 MockRead(SYNCHRONOUS, "1"),
2784 MockRead("HTTP/1.1 200 OK\r\n"),
2785 MockRead("Content-Length: 2\r\n\r\n"),
2786 MockRead(SYNCHRONOUS, "22"),
2875 MockRead data_reads1[] = {
2876 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
2878 MockRead("HTTP/1.1 200 OK\r\n"),
2879 MockRead("Content-Length: 1\r\n\r\n"),
2880 MockRead(SYNCHRONOUS, "1"),
2882 MockRead("HTTP/1.1 200 OK\r\n"),
2883 MockRead("Content-Length: 2\r\n\r\n"),
2884 MockRead(SYNCHRONOUS, "22"),
2960 MockRead data_reads1[] = {
2961 MockRead("HTTP/1.1 200 OK\r\n"),
2962 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
2963 MockRead("Content-Length: 100\r\n\r\n"),
2964 MockRead(SYNCHRONOUS, OK),
3022 MockRead spdy_reads[] = {
3025 MockRead(ASYNC, 0, 0),
3087 MockRead spdy_reads[] = {
3088 CreateMockRead(*resp), CreateMockRead(*data), MockRead(ASYNC, 0, 0),
3189 MockRead spdy_reads[] = {
3194 MockRead(ASYNC, 0, 7),
3287 MockRead spdy_reads[] = {
3292 MockRead(ASYNC, 0, 8),
3377 MockRead spdy_reads[] = {
3381 MockRead(ASYNC, 0, 8),
3449 MockRead spdy_reads[] = {
3451 MockRead(ASYNC, 0, 4),
3552 MockRead spdy_reads[] = {
3559 MockRead(ASYNC, 0, 10),
3689 MockRead spdy_reads[] = {
3695 MockRead(ASYNC, 0, 8),
3805 MockRead spdy_reads[] = {
3810 MockRead(ASYNC, 0, 6),
3903 MockRead data_reads1[] = {
3905 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
3906 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
3907 MockRead("Proxy-Connection: keep-alive\r\n"),
3908 MockRead("Content-Length: 0\r\n\r\n"),
3910 MockRead("HTTP/1.1 200 OK\r\n"),
3911 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
3912 MockRead("Content-Length: 100\r\n\r\n"),
3913 MockRead(SYNCHRONOUS, OK),
3972 const MockRead& status, int expected_status) {
3989 MockRead data_reads[] = {
3991 MockRead("Content-Length: 10\r\n\r\n"),
3993 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
4013 const MockRead& status) {
4019 ConnectStatusHelper(MockRead("HTTP/1.1 100 Continue\r\n"));
4023 ConnectStatusHelper(MockRead("HTTP/1.1 101 Switching Protocols\r\n"));
4027 ConnectStatusHelper(MockRead("HTTP/1.1 201 Created\r\n"));
4031 ConnectStatusHelper(MockRead("HTTP/1.1 202 Accepted\r\n"));
4036 MockRead("HTTP/1.1 203 Non-Authoritative Information\r\n"));
4040 ConnectStatusHelper(MockRead("HTTP/1.1 204 No Content\r\n"));
4044 ConnectStatusHelper(MockRead("HTTP/1.1 205 Reset Content\r\n"));
4048 ConnectStatusHelper(MockRead("HTTP/1.1 206 Partial Content\r\n"));
4052 ConnectStatusHelper(MockRead("HTTP/1.1 300 Multiple Choices\r\n"));
4056 ConnectStatusHelper(MockRead("HTTP/1.1 301 Moved Permanently\r\n"));
4060 ConnectStatusHelper(MockRead("HTTP/1.1 302 Found\r\n"));
4064 ConnectStatusHelper(MockRead("HTTP/1.1 303 See Other\r\n"));
4068 ConnectStatusHelper(MockRead("HTTP/1.1 304 Not Modified\r\n"));
4072 ConnectStatusHelper(MockRead("HTTP/1.1 305 Use Proxy\r\n"));
4076 ConnectStatusHelper(MockRead("HTTP/1.1 306\r\n"));
4080 ConnectStatusHelper(MockRead("HTTP/1.1 307 Temporary Redirect\r\n"));
4084 ConnectStatusHelper(MockRead("HTTP/1.1 308 Permanent Redirect\r\n"));
4088 ConnectStatusHelper(MockRead("HTTP/1.1 400 Bad Request\r\n"));
4092 ConnectStatusHelper(MockRead("HTTP/1.1 401 Unauthorized\r\n"));
4096 ConnectStatusHelper(MockRead("HTTP/1.1 402 Payment Required\r\n"));
4100 ConnectStatusHelper(MockRead("HTTP/1.1 403 Forbidden\r\n"));
4104 ConnectStatusHelper(MockRead("HTTP/1.1 404 Not Found\r\n"));
4108 ConnectStatusHelper(MockRead("HTTP/1.1 405 Method Not Allowed\r\n"));
4112 ConnectStatusHelper(MockRead("HTTP/1.1 406 Not Acceptable\r\n"));
4117 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
4122 ConnectStatusHelper(MockRead("HTTP/1.1 408 Request Timeout\r\n"));
4126 ConnectStatusHelper(MockRead("HTTP/1.1 409 Conflict\r\n"));
4130 ConnectStatusHelper(MockRead("HTTP/1.1 410 Gone\r\n"));
4134 ConnectStatusHelper(MockRead("HTTP/1.1 411 Length Required\r\n"));
4138 ConnectStatusHelper(MockRead("HTTP/1.1 412 Precondition Failed\r\n"));
4142 ConnectStatusHelper(MockRead("HTTP/1.1 413 Request Entity Too Large\r\n"));
4146 ConnectStatusHelper(MockRead("HTTP/1.1 414 Request-URI Too Long\r\n"));
4150 ConnectStatusHelper(MockRead("HTTP/1.1 415 Unsupported Media Type\r\n"));
4155 MockRead("HTTP/1.1 416 Requested Range Not Satisfiable\r\n"));
4159 ConnectStatusHelper(MockRead("HTTP/1.1 417 Expectation Failed\r\n"));
4163 ConnectStatusHelper(MockRead("HTTP/1.1 500 Internal Server Error\r\n"));
4167 ConnectStatusHelper(MockRead("HTTP/1.1 501 Not Implemented\r\n"));
4171 ConnectStatusHelper(MockRead("HTTP/1.1 502 Bad Gateway\r\n"));
4175 ConnectStatusHelper(MockRead("HTTP/1.1 503 Service Unavailable\r\n"));
4179 ConnectStatusHelper(MockRead("HTTP/1.1 504 Gateway Timeout\r\n"));
4183 ConnectStatusHelper(MockRead("HTTP/1.1 505 HTTP Version Not Supported\r\n"));
4208 MockRead data_reads1[] = {
4209 MockRead("HTTP/1.0 407 Unauthorized\r\n"),
4212 MockRead("Proxy-Authenticate: Basic invalid\r\n"), // Malformed.
4213 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
4214 MockRead("Proxy-Authenticate: UNSUPPORTED realm=\"FOO\"\r\n"),
4215 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
4217 MockRead("Content-Length: 10000\r\n\r\n"),
4218 MockRead(SYNCHRONOUS, ERR_FAILED),
4233 MockRead data_reads2[] = {
4234 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
4237 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
4238 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
4239 MockRead("Content-Length: 2000\r\n\r\n"),
4240 MockRead(SYNCHRONOUS, ERR_FAILED), // Won't be reached.
4254 MockRead data_reads3[] = {
4255 MockRead("HTTP/1.0 200 OK\r\n"),
4256 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
4257 MockRead("Content-Length: 100\r\n\r\n"),
4258 MockRead(SYNCHRONOUS, OK),
4338 MockRead data_reads1[] = {
4339 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4343 MockRead("WWW-Authenticate: NTLM\r\n"),
4344 MockRead("Connection: close\r\n"),
4345 MockRead("Content-Length: 42\r\n"),
4346 MockRead("Content-Type: text/html\r\n\r\n"),
4348 MockRead(SYNCHRONOUS, ERR_UNEXPECTED),
4374 MockRead data_reads2[] = {
4376 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4377 MockRead("WWW-Authenticate: NTLM "
4385 MockRead("Content-Length: 42\r\n"),
4386 MockRead("Content-Type: text/html\r\n\r\n"),
4387 MockRead("You are not authorized to view this page\r\n"),
4390 MockRead("HTTP/1.1 200 OK\r\n"),
4391 MockRead("Content-Type: text/html; charset=utf-8\r\n"),
4392 MockRead("Content-Length: 13\r\n\r\n"),
4393 MockRead("Please Login\r\n"),
4394 MockRead(SYNCHRONOUS, OK),
4467 MockRead data_reads1[] = {
4468 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4472 MockRead("WWW-Authenticate: NTLM\r\n"),
4473 MockRead("Connection: close\r\n"),
4474 MockRead("Content-Length: 42\r\n"),
4475 MockRead("Content-Type: text/html\r\n\r\n"),
4477 MockRead(SYNCHRONOUS, ERR_UNEXPECTED),
4503 MockRead data_reads2[] = {
4505 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4506 MockRead("WWW-Authenticate: NTLM "
4514 MockRead("Content-Length: 42\r\n"),
4515 MockRead("Content-Type: text/html\r\n\r\n"),
4516 MockRead("You are not authorized to view this page\r\n"),
4519 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4520 MockRead("WWW-Authenticate: NTLM\r\n"),
4521 MockRead("Connection: close\r\n"),
4522 MockRead("Content-Length: 42\r\n"),
4523 MockRead("Content-Type: text/html\r\n\r\n"),
4525 MockRead(SYNCHRONOUS, ERR_UNEXPECTED),
4551 MockRead data_reads3[] = {
4553 MockRead("HTTP/1.1 401 Access Denied\r\n"),
4554 MockRead("WWW-Authenticate: NTLM "
4562 MockRead("Content-Length: 42\r\n"),
4563 MockRead("Content-Type: text/html\r\n\r\n"),
4564 MockRead("You are not authorized to view this page\r\n"),
4567 MockRead("HTTP/1.1 200 OK\r\n"),
4568 MockRead("Content-Type: text/html; charset=utf-8\r\n"),
4569 MockRead("Content-Length: 13\r\n\r\n"),
4570 MockRead("Please Login\r\n"),
4571 MockRead(SYNCHRONOUS, OK),
4667 MockRead data_reads[] = {
4668 MockRead("HTTP/1.0 200 OK\r\n"),
4669 MockRead(ASYNC, large_headers_string.data(), large_headers_string.size()),
4670 MockRead("\r\nBODY"),
4671 MockRead(SYNCHRONOUS, OK),
4716 MockRead data_reads1[] = {
4717 MockRead("HTTP/1.1 404 Not Found\r\n"),
4718 MockRead("Content-Length: 10\r\n\r\n"),
4719 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
4762 MockRead data_reads[] = {
4764 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nhel"),
4766 MockRead("lo"),
4767 MockRead(" world"),
4768 MockRead("junk"), // Should not be read!!
4769 MockRead(SYNCHRONOUS, OK),
4819 MockRead data_reads[] = {
4820 MockRead("HTTP/1.1 200 OK\r\n"),
4821 MockRead("Content-Length: 11\r\n\r\n"),
4822 MockRead("hello world"),
4823 MockRead(SYNCHRONOUS, OK),
4881 MockRead data_reads[] = {
4882 MockRead("HTTP/1.1 200 OK\r\n"),
4883 MockRead("Content-Length: 11\r\n\r\n"),
4884 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
4885 MockRead("hello world"),
4886 MockRead(ASYNC, 0, 0) // EOF
4975 MockRead data_reads[] = {
4976 MockRead("HTTP/1.1 204 No Content\r\n"
4979 MockRead("junk"), // Should not be read!!
4980 MockRead(SYNCHRONOUS, OK),
5042 MockRead data_reads1[] = {
5043 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\n"),
5044 MockRead("hello world"),
5045 MockRead(SYNCHRONOUS, OK),
5060 MockRead data_reads2[] = {
5061 MockRead("HTTP/1.1 200 OK\r\nContent-Length: 7\r\n\r\n"),
5062 MockRead("welcome"),
5063 MockRead(SYNCHRONOUS, OK),
5128 MockRead data_reads1[] = {
5129 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5130 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5131 MockRead("Content-Length: 10\r\n\r\n"),
5132 MockRead(SYNCHRONOUS, ERR_FAILED),
5144 MockRead data_reads2[] = {
5145 MockRead("HTTP/1.0 200 OK\r\n"),
5146 MockRead("Content-Length: 100\r\n\r\n"),
5147 MockRead(SYNCHRONOUS, OK),
5205 MockRead data_reads1[] = {
5206 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5207 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5208 MockRead("Content-Length: 10\r\n\r\n"),
5209 MockRead(SYNCHRONOUS, ERR_FAILED),
5221 MockRead data_reads2[] = {
5222 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5223 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5224 MockRead("Content-Length: 10\r\n\r\n"),
5225 MockRead(SYNCHRONOUS, ERR_FAILED),
5237 MockRead data_reads3[] = {
5238 MockRead("HTTP/1.0 200 OK\r\n"),
5239 MockRead("Content-Length: 100\r\n\r\n"),
5240 MockRead(SYNCHRONOUS, OK),
5313 MockRead data_reads1[] = {
5314 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5315 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5316 MockRead("Content-Length: 10\r\n\r\n"),
5317 MockRead(SYNCHRONOUS, ERR_FAILED),
5330 MockRead
5331 MockRead("HTTP/1.0 200 OK\r\n"),
5332 MockRead("Content-Length: 100\r\n\r\n"),
5333 MockRead(SYNCHRONOUS, OK),
5393 MockRead data_reads1[] = {
5394 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5395 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5396 MockRead("Content-Length: 10000\r\n\r\n"),
5397 MockRead(SYNCHRONOUS, ERR_FAILED),
5409 MockRead data_reads2[] = {
5410 MockRead("HTTP/1.0 200 OK\r\n"),
5411 MockRead("Content-Length: 100\r\n\r\n"),
5412 MockRead(SYNCHRONOUS, OK),
5473 MockRead data_reads1[] = {
5474 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5475 MockRead("WWW-Authenticate: Basic realm=\"MyRealm2\"\r\n"),
5476 MockRead("Content-Length: 10000\r\n\r\n"),
5477 MockRead(SYNCHRONOUS, ERR_FAILED),
5489 MockRead data_reads2[] = {
5490 MockRead("HTTP/1.0 200 OK\r\n"),
5491 MockRead("Content-Length: 100\r\n\r\n"),
5492 MockRead(SYNCHRONOUS, OK),
5557 MockRead data_reads1[] = {
5558 MockRead("HTTP/1.0 200 OK\r\n"),
5559 MockRead("Content-Length: 100\r\n\r\n"),
5560 MockRead(SYNCHRONOUS, OK),
5601 MockRead data_reads1[] = {
5602 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5603 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5604 MockRead("Content-Length: 10000\r\n\r\n"),
5605 MockRead(SYNCHRONOUS, ERR_FAILED),
5617 MockRead data_reads2[] = {
5618 MockRead("HTTP/1.0 200 OK\r\n"),
5619 MockRead("Content-Length: 100\r\n\r\n"),
5620 MockRead(SYNCHRONOUS, OK),
5671 MockRead data_reads1[] = {
5672 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5673 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5674 MockRead("Content-Length: 10000\r\n\r\n"),
5675 MockRead(SYNCHRONOUS, ERR_FAILED),
5687 MockRead data_reads2[] = {
5688 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5689 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
5690 MockRead("Content-Length: 10000\r\n\r\n"),
5691 MockRead(SYNCHRONOUS, ERR_FAILED),
5704 MockRead data_reads3[] = {
5705 MockRead("HTTP/1.0 200 OK\r\n"),
5706 MockRead("Content-Length: 100\r\n\r\n"),
5707 MockRead(SYNCHRONOUS, OK),
5783 MockRead data_reads1[] = {
5784 MockRead("HTTP/1.0 401 Unauthorized\r\n"),
5785 MockRead("WWW-Authenticate: Digest realm=\"digestive\", nonce=\"OU812\", "
5787 MockRead(SYNCHRONOUS, OK),
5802 MockRead data_reads2[] = {
5803 MockRead("HTTP/1.0 200 OK\r\n"),
5804 MockRead(SYNCHRONOUS, OK),
5867 MockRead data_reads1[] = {
5868 MockRead("HTTP/1.0 200 OK\r\n"),
5869 MockRead("Content-Length: 100\r\n\r\n"),
5870 MockRead(SYNCHRONOUS, OK),
5951 MockRead data_reads[] = {
5952 MockRead("HTTP/1.0 200 OK\r\n"),
5953 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
5954 MockRead("Content-Length: 100\r\n\r\n"),
5955 MockRead(SYNCHRONOUS, OK),
6005 MockRead proxy_reads[] = {
6006 MockRead("HTTP/1.0 200 Connected\r\n\r\n"),
6007 MockRead(SYNCHRONOUS, OK)
6019 MockRead data_reads[] = {
6020 MockRead("HTTP/1.0 200 Connected\r\n\r\n"),
6021 MockRead("HTTP/1.0 200 OK\r\n"),
6022 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6023 MockRead("Content-Length: 100\r\n\r\n"),
6024 MockRead(SYNCHRONOUS, OK),
6090 MockRead data_reads[] = {
6091 MockRead("HTTP/1.0 200 Connected\r\n\r\n"),
6092 MockRead("HTTP/1.1 200 OK\r\n"),
6093 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6094 MockRead("Content-Length: 100\r\n\r\n"),
6095 MockRead(SYNCHRONOUS, OK),
6151 MockRead data_reads[] = {
6152 MockRead("HTTP/1.1 302 Redirect\r\n"),
6153 MockRead("Location: http://login.example.com/\r\n"),
6154 MockRead("Content-Length: 0\r\n\r\n"),
6155 MockRead(SYNCHRONOUS, OK),
6235 MockRead data_reads[] = {
6237 MockRead(ASYNC, 0, 2), // EOF
6288 MockRead data_reads[] = {
6289 MockRead("HTTP/1.1 404 Not Found\r\n"),
6290 MockRead("Content-Length: 23\r\n\r\n"),
6291 MockRead("The host does not exist"),
6292 MockRead(SYNCHRONOUS, OK),
6347 MockRead data_reads[] = {
6350 MockRead(ASYNC, 0, 4), // EOF
6439 MockRead spdy_reads[] = {
6444 MockRead(ASYNC, OK, 11), // EOF. May or may not be read.
6562 MockRead spdy_reads[] = {
6567 MockRead(ASYNC, ERR_IO_PENDING, 6), // Force a pause
6677 MockRead spdy_reads[] = {
6681 MockRead(ASYNC, ERR_IO_PENDING, 6), // Force a pause
6736 MockRead bad_cert_reads[] = {
6737 MockRead("HTTP/1.0 200 Connected\r\n\r\n"),
6738 MockRead(SYNCHRONOUS, OK)
6751 MockRead good_cert_reads[] = {
6752 MockRead("HTTP/1.0 200 Connected\r\n\r\n"),
6753 MockRead("HTTP/1.0 200 OK\r\n"),
6754 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6755 MockRead("Content-Length: 100\r\n\r\n"),
6756 MockRead(SYNCHRONOUS, OK),
6820 MockRead data_reads[] = {
6821 MockRead("HTTP/1.0 200 OK\r\n"),
6822 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6823 MockRead("Content-Length: 100\r\n\r\n"),
6824 MockRead(SYNCHRONOUS, OK),
6858 MockRead data_reads[] = {
6861 MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
6862 MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
6863 MockRead("Proxy-Connection: close\r\n\r\n"),
6899 MockRead data_reads[] = {
6900 MockRead("HTTP/1.0 200 OK\r\n"),
6901 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6902 MockRead("Content-Length: 100\r\n\r\n"),
6903 MockRead(SYNCHRONOUS, OK),
6936 MockRead data_reads[] = {
6937 MockRead("HTTP/1.0 200 OK\r\n"),
6938 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6939 MockRead("Content-Length: 100\r\n\r\n"),
6940 MockRead(SYNCHRONOUS, OK),
6973 MockRead data_reads[] = {
6974 MockRead("HTTP/1.0 200 OK\r\n"),
6975 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
6976 MockRead("Content-Length: 100\r\n\r\n"),
6977 MockRead(SYNCHRONOUS, OK),
7010 MockRead data_reads[] = {
7011 MockRead("HTTP/1.0 200 OK\r\n"),
7012 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7013 MockRead("Content-Length: 100\r\n\r\n"),
7014 MockRead(SYNCHRONOUS, OK),
7049 MockRead data_reads[] = {
7050 MockRead("HTTP/1.0 200 OK\r\n"),
7051 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7052 MockRead("Content-Length: 100\r\n\r\n"),
7053 MockRead(SYNCHRONOUS, OK),
7088 MockRead data_reads[] = {
7089 MockRead("HTTP/1.0 200 OK\r\n"),
7090 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7091 MockRead("Content-Length: 100\r\n\r\n"),
7092 MockRead(SYNCHRONOUS, OK),
7126 MockRead data_reads[] = {
7127 MockRead("HTTP/1.0 200 OK\r\n"),
7128 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7129 MockRead("Content-Length: 100\r\n\r\n"),
7130 MockRead(SYNCHRONOUS, OK),
7168 MockRead data_reads[] = {
7169 MockRead("HTTP/1.0 200 OK\r\n"),
7170 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7171 MockRead("Content-Length: 100\r\n\r\n"),
7172 MockRead(SYNCHRONOUS, OK),
7213 MockRead data_reads[] = {
7214 MockRead(ASYNC, read_buffer, arraysize(read_buffer)),
7215 MockRead("HTTP/1.0 200 OK\r\n"),
7216 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"),
7217 MockRead("Payload"),
7218 MockRead(SYNCHRONOUS, OK)
7273 MockRead data_reads[] = {
7274 MockRead(ASYNC, reinterpret_cast<char*>(read_buffer),
7276 MockRead("HTTP/1.0 200 OK\r\n"),
7277 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"),
7278 MockRead("Payload"),
7279 MockRead(SYNCHRONOUS, OK)
7336 MockRead data_reads[] = {
7337 MockRead(ASYNC, read_buffer, arraysize(read_buffer)),
7338 MockRead("HTTP/1.0 200 OK\r\n"),
7339 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"),
7340 MockRead("Payload"),
7341 MockRead(SYNCHRONOUS, OK)
7408 MockRead data_reads[] = {
7409 MockRead(ASYNC, kSOCKS5GreetResponse, arraysize(kSOCKS5GreetResponse)),
7410 MockRead(ASYNC, kSOCKS5OkResponse, arraysize(kSOCKS5OkResponse)),
7411 MockRead("HTTP/1.0 200 OK\r\n"),
7412 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"),
7413 MockRead("Payload"),
7414 MockRead(SYNCHRONOUS, OK)
7483 MockRead data_reads[] = {
7484 MockRead(ASYNC, kSOCKS5GreetResponse, arraysize(kSOCKS5GreetResponse)),
7485 MockRead(ASYNC, kSOCKS5OkResponse, arraysize(kSOCKS5OkResponse)),
7486 MockRead("HTTP/1.0 200 OK\r\n"),
7487 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"),
7488 MockRead("Payload"),
7489 MockRead(SYNCHRONOUS, OK)
7847 MockRead data_reads[] = { MockRead(SYNCHRONOUS, ERR_UNEXPECTED) };
7909 MockRead data_reads[] = {
7910 MockRead("HTTP/1."),
7911 MockRead(SYNCHRONOUS, OK),
7955 MockRead data_reads1[] = {
7956 MockRead("HTTP/1.1 401 Unauthorized\r\n"),
7957 MockRead("WWW-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
7958 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7959 MockRead("Content-Length: 14\r\n\r\n"),
7960 MockRead("Unauth"),
7961 MockRead(ASYNC, ERR_CONNECTION_RESET),
7978 MockRead data_reads2[] = {
7979 MockRead("HTTP/1.1 200 OK\r\n"),
7980 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
7981 MockRead("Content-Length: 100\r\n\r\n"),
7982 MockRead(SYNCHRONOUS, OK),
8029 MockRead proxy_reads[] = {
8030 MockRead("HTTP/1.0 200 Connected\r\n\r\nExtra data"),
8031 MockRead(SYNCHRONOUS, OK)
8065 MockRead data_reads[] = {
8066 MockRead("HTTP/1.0 200 OK\r\nContent-Length:6719476739\r\n\r\n"),
8067 MockRead(SYNCHRONOUS, OK),
8117 MockRead data_reads[] = {
8118 MockRead("HTTP/1.0 200 OK\r\n\r\n"),
8119 MockRead("hello world"),
8120 MockRead(SYNCHRONOUS, OK),
8264 MockRead data_reads1[] = {
8265 MockRead("HTTP/1.1 401 Unauthorized\r\n"
8280 MockRead data_reads2[] = {
8281 MockRead("HTTP/1.1 401 Unauthorized\r\n"
8295 MockRead data_reads3[] = {
8296 MockRead("HTTP/1.1 401 Unauthorized\r\n"
8309 MockRead data_reads4[] = {
8310 MockRead("HTTP/1.1 200 OK\r\n"
8408 MockRead data_reads[] = {
8409 MockRead("HTTP/1.1 200 OK\r\n"),
8410 MockRead(alternate_protocol_http_header.c_str()),
8411 MockRead("hello world"),
8412 MockRead(SYNCHRONOUS, OK),
8474 MockRead data_reads[] = {
8475 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8476 MockRead("hello world"),
8477 MockRead(ASYNC, OK),
8537 MockRead data_reads[] = {
8538 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8539 MockRead("hello world"),
8540 MockRead(ASYNC, OK),
8588 MockRead data_reads[] = {
8589 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8590 MockRead("hello world"),
8591 MockRead(ASYNC, OK),
8636 MockRead data_reads[] = {
8637 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8638 MockRead("hello world"),
8639 MockRead(ASYNC, OK),
8685 MockRead data_reads[] = {
8686 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8687 MockRead("hello world"),
8688 MockRead(ASYNC, OK),
8733 MockRead data_reads[] = {
8734 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8735 MockRead("hello world"),
8736 MockRead(ASYNC, OK),
8776 MockRead data_reads[] = {
8777 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
8778 MockRead("hello world"),
8779 MockRead(ASYNC, OK),
8829 MockRead data_reads[] = {
8830 MockRead("HTTP/1.1 200 OK\r\n"),
8831 MockRead(alternate_protocol_http_header.c_str()),
8832 MockRead("hello world"),
8833 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
8834 MockRead(ASYNC, OK)
8851 MockRead spdy_reads[] = {
8854 MockRead(ASYNC, 0, 0),
8919 MockRead data_reads[] = {
8920 MockRead("HTTP/1.1 200 OK\r\n"),
8921 MockRead(alternate_protocol_http_header.c_str()),
8922 MockRead("hello world"),
8923 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
8924 MockRead(ASYNC, OK),
8957 MockRead spdy_reads[] = {
8962 MockRead(ASYNC, 0, 0),
9036 MockRead data_reads[] = {
9037 MockRead("HTTP/1.1 200 OK\r\n"),
9038 MockRead(alternate_protocol_http_header.c_str()),
9039 MockRead("hello world"),
9040 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
9041 MockRead(ASYNC, OK),
9167 MockRead data_reads[] = {
9168 MockRead("HTTP/1.1 200 OK\r\n"),
9169 MockRead(alternate_protocol_http_header.c_str()),
9170 MockRead("hello world"),
9171 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
9172 MockRead(ASYNC, OK),
9196 MockRead spdy_reads[] = {
9197 MockRead(ASYNC, kCONNECTResponse, arraysize(kCONNECTResponse) - 1, 1), // 1
9200 MockRead(ASYNC, 0, 0, 4), // 6
9277 MockRead data_reads[] = {
9278 MockRead("HTTP/1.1 200 OK\r\n"),
9279 MockRead(alternate_protocol_http_header.c_str()),
9280 MockRead("hello world"),
9281 MockRead(ASYNC, OK),
9298 MockRead spdy_reads[] = {
9301 MockRead(ASYNC, 0, 0),
9421 const MockRead kSuccess(
9426 const MockRead kFailure(
9428 const MockRead kServerChallenge(
9434 const MockRead kProxyChallenge(
9441 const MockRead kProxyConnected(
9454 TestRound(const MockWrite& write_arg, const MockRead& read_arg,
9462 TestRound(const MockWrite& write_arg, const MockRead& read_arg,
9464 const MockRead* extra_read_arg)
9472 MockRead read;
9475 const MockRead* extra_read;
9711 MockRead reads[2];
9827 const MockRead kServerChallenge(
9833 const MockRead kSuccess(
9851 MockRead reads[] = {
9976 MockRead data_reads[] = {
9977 MockRead("HTTP/1.1 200 OK\r\n"),
9978 MockRead(alternate_protocol_http_header.c_str()),
9979 MockRead("hello world"),
9980 MockRead(SYNCHRONOUS, OK),
10038 MockRead spdy_reads[] = {
10039 MockRead(SYNCHRONOUS, 0, 0) // Not async - return 0 immediately.
10115 MockRead data_reads_1[] = {
10116 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
10117 MockRead("HTTP/1.1 200 OK\r\n"
10169 MockRead data_reads_2[] = {
10171 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ, 1),
10172 MockRead(ASYNC, kRejectConnectResponse,
10176 MockRead(ASYNC, kAcceptConnectResponse,
10182 MockRead(ASYNC, 0, 0, 6),
10250 MockRead data_reads[] = {
10251 MockRead(SYNCHRONOUS, "HTTP/1.0 200 OK\r\n\r\n"),
10252 MockRead(SYNCHRONOUS, "hello world"),
10253 MockRead(SYNCHRONOUS, OK),
10287 MockRead data_reads[] = {
10288 MockRead(ASYNC, "HTTP/1.1 200 OK\r\n"),
10289 MockRead(ASYNC, "Content-Length: 2\r\n"),
10290 MockRead(ASYNC, "Connection: Keep-Alive\r\n\r\n"),
10291 MockRead(ASYNC, "1"),
10294 MockRead(ASYNC, "2"),
10295 MockRead(SYNCHRONOUS, ERR_IO_PENDING), // Should never read this.
10348 MockRead data_reads1[] = {
10349 MockRead("HTTP/1.1 200 OK\r\n"),
10350 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
10351 MockRead("Content-Length: 100\r\n\r\n"),
10352 MockRead(SYNCHRONOUS, OK),
10416 MockRead data_reads1[] = {
10417 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
10419 MockRead("HTTP/1.1 200 OK\r\n"),
10420 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
10421 MockRead("Content-Length: 100\r\n\r\n"),
10422 MockRead(SYNCHRONOUS, OK),
10491 MockRead data_reads1[] = {
10492 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
10493 MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
10494 MockRead(ASYNC, 0, 0), // EOF
10532 MockRead spdy_reads[] = {
10535 MockRead(ASYNC, 0, 0),
10773 net::MockRead data2_reads[] = {
10774 net::MockRead(ASYNC /* async */, net::ERR_SSL_PROTOCOL_ERROR),
10994 MockRead spdy_reads[] = {
10999 MockRead(ASYNC, 0, 7),
11097 MockRead spdy_reads[] = {
11102 MockRead(ASYNC, 0, 7),
11243 MockRead spdy_reads[] = {
11248 MockRead(ASYNC, 0, 7),
11330 MockRead reads1[] = {
11333 MockRead(ASYNC, ERR_IO_PENDING, 3)
11350 MockRead reads2[] = {
11351 MockRead(ASYNC, 5, "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n"),
11352 MockRead(ASYNC, 6, "hello"),
11353 MockRead(ASYNC, 7, OK),
11436 MockRead reads1[] = {
11442 MockRead(ASYNC, ERR_IO_PENDING, 8)
11530 MockRead reads[] = {
11535 MockRead(ASYNC, ERR_IO_PENDING, 7)
11598 MockRead reads1[] = {
11601 MockRead(ASYNC, OK, 3) // EOF
11623 MockRead reads2[] = {
11626 MockRead(ASYNC, OK, 3) // EOF
11713 MockRead reads1[] = {
11714 MockRead(SYNCHRONOUS, ERR_CONNECTION_CLOSED, 0)
11729 MockRead reads2[] = {
11732 MockRead(ASYNC, OK, 3) // EOF
11812 MockRead spdy1_reads[] = {
11815 MockRead(ASYNC, ERR_IO_PENDING, 4),
11833 MockRead spdy2_reads[] = {
11836 MockRead(ASYNC, ERR_IO_PENDING, 4),
11851 MockRead http_read[] = {
11852 MockRead("HTTP/1.1 200 OK\r\n"),
11853 MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"),
11854 MockRead("Content-Length: 6\r\n\r\n"),
11855 MockRead("hello!"),
12023 MockRead data_reads[] = {
12024 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
12059 MockRead data_reads[] = {
12060 MockRead(SYNCHRONOUS, ERR_UNEXPECTED), // Should not be reached.
12097 MockRead data_reads[] = {
12098 MockRead(SYNCHRONOUS, ERR_CONNECTION_RESET),
12135 MockRead data_reads[] = {
12136 MockRead(ASYNC, ERR_CONNECTION_RESET),
12175 MockRead data_reads[] = {
12176 MockRead("HTTP/1.1 200 OK\r\n"
12179 MockRead(ASYNC, ERR_UNEXPECTED),
12586 MockRead ssl_reads[] = {
12587 MockRead("HTTP/1.1 200 OK\r\n"),
12588 MockRead("Content-Length: 11\r\n\r\n"),
12589 MockRead("hello world"),
12590 MockRead(SYNCHRONOUS, OK),
12610 MockRead http_reads[] = {
12611 MockRead("HTTP/1.1 200 OK\r\n"),
12612 MockRead("Content-Length: 7\r\n\r\n"),
12613 MockRead("falafel"),
12614 MockRead(SYNCHRONOUS, OK),
12691 MockRead http_reads[] = {
12692 MockRead("HTTP/1.1 200 OK\r\n"),
12693 MockRead("Content-Length: 7\r\n\r\n"),
12694 MockRead("falafel"),
12695 MockRead(SYNCHRONOUS, OK),
12754 MockRead data_reads[] = {
12755 MockRead("HTTP/1.0 400 Not OK\r\n\r\n"),
12756 MockRead("hello world"),
12757 MockRead(SYNCHRONOUS, OK),
12799 MockRead data_reads[] = {
12800 MockRead("HTTP/1.1 200 Peachy\r\n"
12802 MockRead("first response"),
12803 MockRead("HTTP/1.1 400 Not OK\r\n"
12805 MockRead("second response"),
12806 MockRead(SYNCHRONOUS, OK),
12894 MockRead data_reads[] = {
12895 MockRead("HTTP/1.0 400 Not OK\r\n\r\n"),
12896 MockRead("hello world"),
12897 MockRead(SYNCHRONOUS, OK),
12948 MockRead data_reads[] = {
12949 MockRead("HTTP/1.0 400 Not OK\r\n\r\n"),
12950 MockRead("hello world"),
12951 MockRead(SYNCHRONOUS, OK),
13007 MockRead data_reads[] = {
13008 MockRead("HTTP/1.0 100 Continue\r\n\r\n"),
13009 MockRead("HTTP/1.0 400 Not OK\r\n\r\n"),
13010 MockRead("hello world"),
13011 MockRead(SYNCHRONOUS, OK),
13060 MockRead data_reads[] = {
13061 MockRead("HTTP/1.0 200 Just Dandy\r\n\r\n"),
13062 MockRead("hello world"),
13063 MockRead(SYNCHRONOUS, OK),
13105 MockRead data_reads[] = {
13106 MockRead("HTTP/1.0 100 Continue\r\n\r\n"),
13107 MockRead("HTTP/1.0 302 Redirect\r\n"),
13108 MockRead("Location: http://somewhere-else.com/\r\n"),
13109 MockRead("Content-Length: 0\r\n\r\n"),
13110 MockRead(SYNCHRONOUS, OK),
13151 MockRead data_reads[] = {
13152 MockRead("HTTP 0.9 rocks!"),
13153 MockRead(SYNCHRONOUS, OK),
13194 MockRead data_reads[] = {
13195 MockRead("HTTP/1.0 400 Not a Full Response\r\n"),
13196 MockRead(SYNCHRONOUS, OK),