Removed 'anonymous' from namespace, added whitespace in thread_restrictions.cc
[chromium-blink-merge.git] / net / websockets / websocket_handshake_challenge_test.cc
blobd7e45ca92fae8fcf810ae2191671b58a88889167
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"
7 #include <string>
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace net {
13 namespace {
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);
22 } // namespace
24 } // namespace net