Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: net/websockets/websocket_job_spdy3_unittest.cc

Issue 10843050: WebSocket over SPDY: handshake support for both of SPDY/2 and SPDY/3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for landing Created 8 years, 4 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/websockets/websocket_job.cc ('k') | no next file » | 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/websockets/websocket_job.h" 5 #include "net/websockets/websocket_job.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n" 537 "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n"
538 "Sec-WebSocket-Protocol: sample\r\n" 538 "Sec-WebSocket-Protocol: sample\r\n"
539 "Set-Cookie: CR-set-test=1\r\n" 539 "Set-Cookie: CR-set-test=1\r\n"
540 "\r\n"; 540 "\r\n";
541 541
542 const char WebSocketJobSpdy3Test::kDataHello[] = "Hello, "; 542 const char WebSocketJobSpdy3Test::kDataHello[] = "Hello, ";
543 543
544 const char WebSocketJobSpdy3Test::kDataWorld[] = "World!\n"; 544 const char WebSocketJobSpdy3Test::kDataWorld[] = "World!\n";
545 545
546 const char* const WebSocketJobSpdy3Test::kHandshakeRequestForSpdy[] = { 546 const char* const WebSocketJobSpdy3Test::kHandshakeRequestForSpdy[] = {
547 "path", "/demo", 547 ":path", "/demo",
548 "version", "WebSocket/13", 548 ":version", "WebSocket/13",
549 "scheme", "ws", 549 ":scheme", "ws",
550 "host", "example.com", 550 ":host", "example.com",
551 "origin", "http://example.com", 551 ":origin", "http://example.com",
552 "sec-websocket-protocol", "sample" 552 ":sec-websocket-protocol", "sample"
553 }; 553 };
554 554
555 const char* const WebSocketJobSpdy3Test::kHandshakeResponseForSpdy[] = { 555 const char* const WebSocketJobSpdy3Test::kHandshakeResponseForSpdy[] = {
556 "status", "101 Switching Protocols", 556 ":status", "101 Switching Protocols",
557 "sec-websocket-protocol", "sample" 557 ":sec-websocket-protocol", "sample"
558 }; 558 };
559 559
560 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithoutCookieLength = 560 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithoutCookieLength =
561 arraysize(kHandshakeRequestWithoutCookie) - 1; 561 arraysize(kHandshakeRequestWithoutCookie) - 1;
562 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithCookieLength = 562 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithCookieLength =
563 arraysize(kHandshakeRequestWithCookie) - 1; 563 arraysize(kHandshakeRequestWithCookie) - 1;
564 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithFilteredCookieLength = 564 const size_t WebSocketJobSpdy3Test::kHandshakeRequestWithFilteredCookieLength =
565 arraysize(kHandshakeRequestWithFilteredCookie) - 1; 565 arraysize(kHandshakeRequestWithFilteredCookie) - 1;
566 const size_t WebSocketJobSpdy3Test::kHandshakeResponseWithoutCookieLength = 566 const size_t WebSocketJobSpdy3Test::kHandshakeResponseWithoutCookieLength =
567 arraysize(kHandshakeResponseWithoutCookie) - 1; 567 arraysize(kHandshakeResponseWithoutCookie) - 1;
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 TEST_F(WebSocketJobSpdy3Test, ThrottlingSpdySpdyEnabled) { 1092 TEST_F(WebSocketJobSpdy3Test, ThrottlingSpdySpdyEnabled) {
1093 WebSocketJob::set_websocket_over_spdy_enabled(true); 1093 WebSocketJob::set_websocket_over_spdy_enabled(true);
1094 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); 1094 TestConnectBySpdy(SPDY_ON, THROTTLING_ON);
1095 } 1095 }
1096 1096
1097 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. 1097 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation.
1098 // TODO(toyoshim,yutak): Add tests to verify closing handshake. 1098 // TODO(toyoshim,yutak): Add tests to verify closing handshake.
1099 1099
1100 } // namespace net 1100 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698