[email protected] | a97ee92 | 2013-01-18 05:32:55 | [diff] [blame^] | 1 | // 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 | |
| 9 | namespace net { |
| 10 | namespace { |
| 11 | |
| 12 | TEST(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 |