| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2987 spdy_util_.ConstructSpdyBodyFrame(1, true)); | 2987 spdy_util_.ConstructSpdyBodyFrame(1, true)); |
| 2988 scoped_ptr<SpdyFrame> stream2_rst( | 2988 scoped_ptr<SpdyFrame> stream2_rst( |
| 2989 spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR)); | 2989 spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_PROTOCOL_ERROR)); |
| 2990 MockWrite writes[] = { | 2990 MockWrite writes[] = { |
| 2991 CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*stream2_rst, 3), | 2991 CreateMockWrite(*stream1_syn, 0), CreateMockWrite(*stream2_rst, 3), |
| 2992 }; | 2992 }; |
| 2993 | 2993 |
| 2994 scoped_ptr<SpdyFrame> | 2994 scoped_ptr<SpdyFrame> |
| 2995 stream1_reply(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); | 2995 stream1_reply(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); |
| 2996 scoped_ptr<SpdyHeaderBlock> incomplete_headers(new SpdyHeaderBlock()); | 2996 scoped_ptr<SpdyHeaderBlock> incomplete_headers(new SpdyHeaderBlock()); |
| 2997 (*incomplete_headers)["hello"] = "bye"; | |
| 2998 (*incomplete_headers)[spdy_util_.GetStatusKey()] = "200 OK"; | 2997 (*incomplete_headers)[spdy_util_.GetStatusKey()] = "200 OK"; |
| 2999 (*incomplete_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; | 2998 (*incomplete_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; |
| 2999 (*incomplete_headers)["hello"] = "bye"; |
| 3000 scoped_ptr<SpdyFrame> stream2_syn(spdy_util_.ConstructInitialSpdyPushFrame( | 3000 scoped_ptr<SpdyFrame> stream2_syn(spdy_util_.ConstructInitialSpdyPushFrame( |
| 3001 incomplete_headers.Pass(), 2, 1)); | 3001 incomplete_headers.Pass(), 2, 1)); |
| 3002 MockRead reads[] = { | 3002 MockRead reads[] = { |
| 3003 CreateMockRead(*stream1_reply, 1), | 3003 CreateMockRead(*stream1_reply, 1), |
| 3004 CreateMockRead(*stream2_syn, 2), | 3004 CreateMockRead(*stream2_syn, 2), |
| 3005 CreateMockRead(*stream1_body, 4), | 3005 CreateMockRead(*stream1_body, 4), |
| 3006 MockRead(SYNCHRONOUS, ERR_IO_PENDING, 5) // Force a pause | 3006 MockRead(SYNCHRONOUS, ERR_IO_PENDING, 5) // Force a pause |
| 3007 }; | 3007 }; |
| 3008 | 3008 |
| 3009 SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes)); | 3009 SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes)); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3053 { NULL }, | 3053 { NULL }, |
| 3054 }, | 3054 }, |
| 3055 // Headers with a comma separated list. | 3055 // Headers with a comma separated list. |
| 3056 { 1, | 3056 { 1, |
| 3057 { "cookie", "val1,val2", | 3057 { "cookie", "val1,val2", |
| 3058 NULL | 3058 NULL |
| 3059 }, | 3059 }, |
| 3060 } | 3060 } |
| 3061 }; | 3061 }; |
| 3062 | 3062 |
| 3063 test_cases[0].expected_headers["cookie"] = "val1"; | |
| 3064 test_cases[0].expected_headers["cookie"] += '\0'; | |
| 3065 test_cases[0].expected_headers["cookie"] += "val2"; | |
| 3066 test_cases[0].expected_headers["hello"] = "bye"; | |
| 3067 test_cases[0].expected_headers["status"] = "200"; | 3063 test_cases[0].expected_headers["status"] = "200"; |
| 3068 | |
| 3069 test_cases[1].expected_headers["hello"] = "bye"; | |
| 3070 test_cases[1].expected_headers["status"] = "200"; | 3064 test_cases[1].expected_headers["status"] = "200"; |
| 3071 | |
| 3072 test_cases[2].expected_headers["cookie"] = "val1,val2"; | |
| 3073 test_cases[2].expected_headers["hello"] = "bye"; | |
| 3074 test_cases[2].expected_headers["status"] = "200"; | 3065 test_cases[2].expected_headers["status"] = "200"; |
| 3075 | 3066 |
| 3067 // HTTP/2 eliminates use of the :version header. |
| 3076 if (spdy_util_.spdy_version() < HTTP2) { | 3068 if (spdy_util_.spdy_version() < HTTP2) { |
| 3077 // HTTP/2 eliminates use of the :version header. | |
| 3078 test_cases[0].expected_headers["version"] = "HTTP/1.1"; | 3069 test_cases[0].expected_headers["version"] = "HTTP/1.1"; |
| 3079 test_cases[1].expected_headers["version"] = "HTTP/1.1"; | 3070 test_cases[1].expected_headers["version"] = "HTTP/1.1"; |
| 3080 test_cases[2].expected_headers["version"] = "HTTP/1.1"; | 3071 test_cases[2].expected_headers["version"] = "HTTP/1.1"; |
| 3081 } | 3072 } |
| 3082 | 3073 |
| 3074 test_cases[0].expected_headers["hello"] = "bye"; |
| 3075 test_cases[1].expected_headers["hello"] = "bye"; |
| 3076 test_cases[2].expected_headers["hello"] = "bye"; |
| 3077 |
| 3078 test_cases[0].expected_headers["cookie"] = StringPiece("val1\0val2", 9); |
| 3079 test_cases[2].expected_headers["cookie"] = "val1,val2"; |
| 3080 |
| 3083 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 3081 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
| 3084 scoped_ptr<SpdyFrame> req( | 3082 scoped_ptr<SpdyFrame> req( |
| 3085 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); | 3083 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); |
| 3086 MockWrite writes[] = {CreateMockWrite(*req, 0)}; | 3084 MockWrite writes[] = {CreateMockWrite(*req, 0)}; |
| 3087 | 3085 |
| 3088 scoped_ptr<SpdyFrame> resp( | 3086 scoped_ptr<SpdyFrame> resp( |
| 3089 spdy_util_.ConstructSpdyGetSynReply(test_cases[i].extra_headers, | 3087 spdy_util_.ConstructSpdyGetSynReply(test_cases[i].extra_headers, |
| 3090 test_cases[i].num_headers, | 3088 test_cases[i].num_headers, |
| 3091 1)); | 3089 1)); |
| 3092 scoped_ptr<SpdyFrame> body(spdy_util_.ConstructSpdyBodyFrame(1, true)); | 3090 scoped_ptr<SpdyFrame> body(spdy_util_.ConstructSpdyBodyFrame(1, true)); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3106 EXPECT_EQ(OK, out.rv); | 3104 EXPECT_EQ(OK, out.rv); |
| 3107 EXPECT_EQ("HTTP/1.1 200 OK", out.status_line); | 3105 EXPECT_EQ("HTTP/1.1 200 OK", out.status_line); |
| 3108 EXPECT_EQ("hello!", out.response_data); | 3106 EXPECT_EQ("hello!", out.response_data); |
| 3109 | 3107 |
| 3110 scoped_refptr<HttpResponseHeaders> headers = out.response_info.headers; | 3108 scoped_refptr<HttpResponseHeaders> headers = out.response_info.headers; |
| 3111 EXPECT_TRUE(headers.get() != NULL); | 3109 EXPECT_TRUE(headers.get() != NULL); |
| 3112 void* iter = NULL; | 3110 void* iter = NULL; |
| 3113 std::string name, value; | 3111 std::string name, value; |
| 3114 SpdyHeaderBlock header_block; | 3112 SpdyHeaderBlock header_block; |
| 3115 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { | 3113 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { |
| 3116 if (header_block[name].empty()) { | 3114 SpdyHeaderBlock::StringPieceProxy mutable_header_block_value = |
| 3117 header_block[name] = value; | 3115 header_block[name]; |
| 3116 if (static_cast<StringPiece>(mutable_header_block_value).empty()) { |
| 3117 mutable_header_block_value = value; |
| 3118 } else { | 3118 } else { |
| 3119 header_block[name] += '\0'; | 3119 std::string joint_value = mutable_header_block_value.as_string(); |
| 3120 header_block[name] += value; | 3120 joint_value.append(1, '\0'); |
| 3121 joint_value.append(value); |
| 3122 mutable_header_block_value = joint_value; |
| 3121 } | 3123 } |
| 3122 } | 3124 } |
| 3123 EXPECT_EQ(test_cases[i].expected_headers, header_block); | 3125 EXPECT_EQ(test_cases[i].expected_headers, header_block); |
| 3124 } | 3126 } |
| 3125 } | 3127 } |
| 3126 | 3128 |
| 3127 // Verify that various SynReply headers parse vary fields correctly | 3129 // Verify that various SynReply headers parse vary fields correctly |
| 3128 // through the HTTP layer, and the response matches the request. | 3130 // through the HTTP layer, and the response matches the request. |
| 3129 TEST_P(SpdyNetworkTransactionTest, SynReplyHeadersVary) { | 3131 TEST_P(SpdyNetworkTransactionTest, SynReplyHeadersVary) { |
| 3130 // Modify the following data to change/add test cases: | 3132 // Modify the following data to change/add test cases: |
| 3131 struct SynReplyTests { | 3133 struct SynReplyTests { |
| 3132 bool vary_matches; | 3134 bool vary_matches; |
| 3133 int num_headers[2]; | 3135 int num_headers[2]; |
| 3134 const char* extra_headers[2][16]; | 3136 const char* extra_headers[2][16]; |
| 3135 } test_cases[] = { | 3137 } test_cases[] = { |
| 3136 // Test the case of a multi-valued cookie. When the value is delimited | 3138 // Test the case of a multi-valued cookie. When the value is delimited |
| 3137 // with NUL characters, it needs to be unfolded into multiple headers. | 3139 // with NUL characters, it needs to be unfolded into multiple headers. |
| 3138 { | 3140 {true, |
| 3139 true, | 3141 {1, 4}, |
| 3140 { 1, 4 }, | 3142 {{"cookie", "val1,val2", NULL}, |
| 3141 { { "cookie", "val1,val2", | 3143 {spdy_util_.GetStatusKey(), "200", spdy_util_.GetPathKey(), |
| 3142 NULL | 3144 "/index.php", spdy_util_.GetVersionKey(), "HTTP/1.1", "vary", "cookie", |
| 3143 }, | 3145 NULL}}}, |
| 3144 { "vary", "cookie", | 3146 {// Multiple vary fields. |
| 3145 spdy_util_.GetStatusKey(), "200", | 3147 true, |
| 3146 spdy_util_.GetPathKey(), "/index.php", | 3148 {2, 5}, |
| 3147 spdy_util_.GetVersionKey(), "HTTP/1.1", | 3149 {{"friend", "barney", "enemy", "snaggletooth", NULL}, |
| 3148 NULL | 3150 {spdy_util_.GetStatusKey(), "200", spdy_util_.GetPathKey(), |
| 3149 } | 3151 "/index.php", spdy_util_.GetVersionKey(), "HTTP/1.1", "vary", "friend", |
| 3150 } | 3152 "vary", "enemy", NULL}}}, |
| 3151 }, { // Multiple vary fields. | 3153 {// Test a '*' vary field. |
| 3152 true, | 3154 false, |
| 3153 { 2, 5 }, | 3155 {1, 4}, |
| 3154 { { "friend", "barney", | 3156 {{"cookie", "val1,val2", NULL}, |
| 3155 "enemy", "snaggletooth", | 3157 {spdy_util_.GetStatusKey(), "200", spdy_util_.GetPathKey(), |
| 3156 NULL | 3158 "/index.php", spdy_util_.GetVersionKey(), "HTTP/1.1", "vary", "*", |
| 3157 }, | 3159 NULL}}}, |
| 3158 { "vary", "friend", | 3160 {// Multiple comma-separated vary fields. |
| 3159 "vary", "enemy", | 3161 true, |
| 3160 spdy_util_.GetStatusKey(), "200", | 3162 {2, 4}, |
| 3161 spdy_util_.GetPathKey(), "/index.php", | 3163 {{"friend", "barney", "enemy", "snaggletooth", NULL}, |
| 3162 spdy_util_.GetVersionKey(), "HTTP/1.1", | 3164 {spdy_util_.GetStatusKey(), "200", spdy_util_.GetPathKey(), |
| 3163 NULL | 3165 "/index.php", spdy_util_.GetVersionKey(), "HTTP/1.1", "vary", |
| 3164 } | 3166 "friend,enemy", NULL}}}}; |
| 3165 } | |
| 3166 }, { // Test a '*' vary field. | |
| 3167 false, | |
| 3168 { 1, 4 }, | |
| 3169 { { "cookie", "val1,val2", | |
| 3170 NULL | |
| 3171 }, | |
| 3172 { "vary", "*", | |
| 3173 spdy_util_.GetStatusKey(), "200", | |
| 3174 spdy_util_.GetPathKey(), "/index.php", | |
| 3175 spdy_util_.GetVersionKey(), "HTTP/1.1", | |
| 3176 NULL | |
| 3177 } | |
| 3178 } | |
| 3179 }, { // Multiple comma-separated vary fields. | |
| 3180 true, | |
| 3181 { 2, 4 }, | |
| 3182 { { "friend", "barney", | |
| 3183 "enemy", "snaggletooth", | |
| 3184 NULL | |
| 3185 }, | |
| 3186 { "vary", "friend,enemy", | |
| 3187 spdy_util_.GetStatusKey(), "200", | |
| 3188 spdy_util_.GetPathKey(), "/index.php", | |
| 3189 spdy_util_.GetVersionKey(), "HTTP/1.1", | |
| 3190 NULL | |
| 3191 } | |
| 3192 } | |
| 3193 } | |
| 3194 }; | |
| 3195 | 3167 |
| 3196 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 3168 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
| 3197 // Construct the request. | 3169 // Construct the request. |
| 3198 scoped_ptr<SpdyFrame> frame_req( | 3170 scoped_ptr<SpdyFrame> frame_req( |
| 3199 spdy_util_.ConstructSpdyGet(test_cases[i].extra_headers[0], | 3171 spdy_util_.ConstructSpdyGet(test_cases[i].extra_headers[0], |
| 3200 test_cases[i].num_headers[0], | 3172 test_cases[i].num_headers[0], |
| 3201 false, 1, LOWEST, true)); | 3173 false, 1, LOWEST, true)); |
| 3202 | 3174 |
| 3203 MockWrite writes[] = { | 3175 MockWrite writes[] = { |
| 3204 CreateMockWrite(*frame_req, 0), | 3176 CreateMockWrite(*frame_req, 0), |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3262 EXPECT_EQ(expected_reply, lines) << i; | 3234 EXPECT_EQ(expected_reply, lines) << i; |
| 3263 } | 3235 } |
| 3264 } | 3236 } |
| 3265 | 3237 |
| 3266 // Verify that we don't crash on invalid SynReply responses. | 3238 // Verify that we don't crash on invalid SynReply responses. |
| 3267 TEST_P(SpdyNetworkTransactionTest, InvalidSynReply) { | 3239 TEST_P(SpdyNetworkTransactionTest, InvalidSynReply) { |
| 3268 struct InvalidSynReplyTests { | 3240 struct InvalidSynReplyTests { |
| 3269 int num_headers; | 3241 int num_headers; |
| 3270 const char* headers[10]; | 3242 const char* headers[10]; |
| 3271 } test_cases[] = { | 3243 } test_cases[] = { |
| 3272 // SYN_REPLY missing status header | 3244 // SYN_REPLY missing status header |
| 3273 { 4, | 3245 { |
| 3274 { "cookie", "val1", | 3246 4, |
| 3275 "cookie", "val2", | 3247 {spdy_util_.GetPathKey(), "/index.php", spdy_util_.GetVersionKey(), |
| 3276 spdy_util_.GetPathKey(), "/index.php", | 3248 "HTTP/1.1", "cookie", "val1", "cookie", "val2", NULL}, |
| 3277 spdy_util_.GetVersionKey(), "HTTP/1.1", | |
| 3278 NULL | |
| 3279 }, | 3249 }, |
| 3280 }, | 3250 // SYN_REPLY missing version header |
| 3281 // SYN_REPLY missing version header | 3251 { |
| 3282 { 2, | 3252 2, {spdy_util_.GetPathKey(), "/index.php", "status", "200", NULL}, |
| 3283 { "status", "200", | |
| 3284 spdy_util_.GetPathKey(), "/index.php", | |
| 3285 NULL | |
| 3286 }, | 3253 }, |
| 3287 }, | 3254 // SYN_REPLY with no headers |
| 3288 // SYN_REPLY with no headers | 3255 { |
| 3289 { 0, { NULL }, }, | 3256 0, {NULL}, |
| 3257 }, |
| 3290 }; | 3258 }; |
| 3291 | 3259 |
| 3292 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 3260 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
| 3293 scoped_ptr<SpdyFrame> req( | 3261 scoped_ptr<SpdyFrame> req( |
| 3294 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); | 3262 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); |
| 3295 scoped_ptr<SpdyFrame> rst( | 3263 scoped_ptr<SpdyFrame> rst( |
| 3296 spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR)); | 3264 spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_PROTOCOL_ERROR)); |
| 3297 MockWrite writes[] = { | 3265 MockWrite writes[] = { |
| 3298 CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2), | 3266 CreateMockWrite(*req, 0), CreateMockWrite(*rst, 2), |
| 3299 }; | 3267 }; |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5008 CreateMockWrite(*stream1_syn, 0), | 4976 CreateMockWrite(*stream1_syn, 0), |
| 5009 }; | 4977 }; |
| 5010 | 4978 |
| 5011 scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock()); | 4979 scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock()); |
| 5012 spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"), | 4980 spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"), |
| 5013 initial_headers.get()); | 4981 initial_headers.get()); |
| 5014 scoped_ptr<SpdyFrame> stream2_syn( | 4982 scoped_ptr<SpdyFrame> stream2_syn( |
| 5015 spdy_util_.ConstructInitialSpdyPushFrame(initial_headers.Pass(), 2, 1)); | 4983 spdy_util_.ConstructInitialSpdyPushFrame(initial_headers.Pass(), 2, 1)); |
| 5016 | 4984 |
| 5017 scoped_ptr<SpdyHeaderBlock> late_headers(new SpdyHeaderBlock()); | 4985 scoped_ptr<SpdyHeaderBlock> late_headers(new SpdyHeaderBlock()); |
| 5018 (*late_headers)["hello"] = "bye"; | |
| 5019 (*late_headers)[spdy_util_.GetStatusKey()] = "200"; | 4986 (*late_headers)[spdy_util_.GetStatusKey()] = "200"; |
| 5020 (*late_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; | 4987 (*late_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; |
| 4988 (*late_headers)["hello"] = "bye"; |
| 5021 scoped_ptr<SpdyFrame> stream2_headers( | 4989 scoped_ptr<SpdyFrame> stream2_headers( |
| 5022 spdy_util_.ConstructSpdyControlFrame(late_headers.Pass(), | 4990 spdy_util_.ConstructSpdyControlFrame(late_headers.Pass(), |
| 5023 false, | 4991 false, |
| 5024 2, | 4992 2, |
| 5025 LOWEST, | 4993 LOWEST, |
| 5026 HEADERS, | 4994 HEADERS, |
| 5027 CONTROL_FLAG_NONE, | 4995 CONTROL_FLAG_NONE, |
| 5028 0)); | 4996 0)); |
| 5029 | 4997 |
| 5030 scoped_ptr<SpdyFrame> | 4998 scoped_ptr<SpdyFrame> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5070 CreateMockWrite(*stream1_syn, 0, SYNCHRONOUS), | 5038 CreateMockWrite(*stream1_syn, 0, SYNCHRONOUS), |
| 5071 }; | 5039 }; |
| 5072 | 5040 |
| 5073 scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock()); | 5041 scoped_ptr<SpdyHeaderBlock> initial_headers(new SpdyHeaderBlock()); |
| 5074 spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"), | 5042 spdy_util_.AddUrlToHeaderBlock(GetDefaultUrlWithPath("/foo.dat"), |
| 5075 initial_headers.get()); | 5043 initial_headers.get()); |
| 5076 scoped_ptr<SpdyFrame> stream2_syn( | 5044 scoped_ptr<SpdyFrame> stream2_syn( |
| 5077 spdy_util_.ConstructInitialSpdyPushFrame(initial_headers.Pass(), 2, 1)); | 5045 spdy_util_.ConstructInitialSpdyPushFrame(initial_headers.Pass(), 2, 1)); |
| 5078 | 5046 |
| 5079 scoped_ptr<SpdyHeaderBlock> late_headers(new SpdyHeaderBlock()); | 5047 scoped_ptr<SpdyHeaderBlock> late_headers(new SpdyHeaderBlock()); |
| 5080 (*late_headers)["hello"] = "bye"; | |
| 5081 (*late_headers)[spdy_util_.GetStatusKey()] = "200"; | 5048 (*late_headers)[spdy_util_.GetStatusKey()] = "200"; |
| 5082 (*late_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; | 5049 (*late_headers)[spdy_util_.GetVersionKey()] = "HTTP/1.1"; |
| 5050 (*late_headers)["hello"] = "bye"; |
| 5083 scoped_ptr<SpdyFrame> stream2_headers( | 5051 scoped_ptr<SpdyFrame> stream2_headers( |
| 5084 spdy_util_.ConstructSpdyControlFrame(late_headers.Pass(), | 5052 spdy_util_.ConstructSpdyControlFrame(late_headers.Pass(), |
| 5085 false, | 5053 false, |
| 5086 2, | 5054 2, |
| 5087 LOWEST, | 5055 LOWEST, |
| 5088 HEADERS, | 5056 HEADERS, |
| 5089 CONTROL_FLAG_NONE, | 5057 CONTROL_FLAG_NONE, |
| 5090 0)); | 5058 0)); |
| 5091 | 5059 |
| 5092 scoped_ptr<SpdyFrame> | 5060 scoped_ptr<SpdyFrame> |
| (...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6624 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6592 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6625 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6593 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6626 new SSLSocketDataProvider(ASYNC, OK)); | 6594 new SSLSocketDataProvider(ASYNC, OK)); |
| 6627 // Set to TLS_RSA_WITH_NULL_MD5 | 6595 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6628 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6596 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6629 | 6597 |
| 6630 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6598 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6631 } | 6599 } |
| 6632 | 6600 |
| 6633 } // namespace net | 6601 } // namespace net |
| OLD | NEW |