blob: f0e719d8d9809f32b41d81dc11ef13f413a4b6d5 [file] [log] [blame]
[email protected]a97ee922013-01-18 05:32:551// Copyright (c) 2013 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.
4
5#include "net/websockets/websocket_errors.h"
6
7#include "testing/gtest/include/gtest/gtest.h"
8
9namespace net {
10namespace {
11
12TEST(WebSocketErrorToNetErrorTest, ResultsAreCorrect) {
13 EXPECT_EQ(OK, WebSocketErrorToNetError(WEB_SOCKET_OK));
14 EXPECT_EQ(ERR_WS_PROTOCOL_ERROR,
15 WebSocketErrorToNetError(WEB_SOCKET_ERR_PROTOCOL_ERROR));
16 EXPECT_EQ(ERR_MSG_TOO_BIG,
17 WebSocketErrorToNetError(WEB_SOCKET_ERR_MESSAGE_TOO_BIG));
18}
19
20} // namespace
21} // namespace net