1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/websockets/websocket_handshake_challenge.h"
9 #include "testing/gtest/include/gtest/gtest.h"
15 // Test the example challenge from the RFC6455.
16 TEST(WebSocketHandshakeChallengeTest
, RFC6455
) {
17 const std::string key
= "dGhlIHNhbXBsZSBub25jZQ==";
18 std::string accept
= ComputeSecWebSocketAccept(key
);
19 EXPECT_EQ("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", accept
);