src/net/websockets/websocket_errors_test.cc
TEST(WebSocketErrorToNetErrorTest, ResultsAreCorrect) {
  EXPECT_THAT(WebSocketErrorToNetError(kWebSocketNormalClosure), IsOk());
  EXPECT_EQ(ERR_WS_PROTOCOL_ERROR,
            WebSocketErrorToNetError(kWebSocketErrorProtocolError));
  EXPECT_EQ(ERR_MSG_TOO_BIG,
            WebSocketErrorToNetError(kWebSocketErrorMessageTooBig));
  EXPECT_EQ(ERR_CONNECTION_CLOSED,
            WebSocketErrorToNetError(kWebSocketErrorNoStatusReceived));
  EXPECT_EQ(ERR_SSL_PROTOCOL_ERROR,
            WebSocketErrorToNetError(kWebSocketErrorTlsHandshake));
}
// Confirm that the principle classes of errors are converted correctly. We
// don't exhaustively test every error code, as it would be long, repetitive,
// and add little value.
Confirm that the principle classes of errors are converted correctly. We
don't exhaustively test every error code, as it would be long, repetitive,
and add little value.
Confirm that the principle classes of errors are converted correctly . We don ' t exhaustively test every error code as it would be long repetitive and add little value .
TEST(WebSocketErrorToNetErrorTest, ResultsAreCorrect) {
  EXPECT_THAT(WebSocketErrorToNetError(kWebSocketNormalClosure), IsOk());
  EXPECT_EQ(ERR_WS_PROTOCOL_ERROR,
            WebSocketErrorToNetError(kWebSocketErrorProtocolError));
  EXPECT_EQ(ERR_MSG_TOO_BIG,
            WebSocketErrorToNetError(kWebSocketErrorMessageTooBig));
  EXPECT_EQ(ERR_CONNECTION_CLOSED,
            WebSocketErrorToNetError(kWebSocketErrorNoStatusReceived));
  EXPECT_EQ(ERR_SSL_PROTOCOL_ERROR,
            WebSocketErrorToNetError(kWebSocketErrorTlsHandshake));
}
TEST ( WebSocketErrorToNetErrorTest , ResultsAreCorrect ) { EXPECT_THAT ( WebSocketErrorToNetError ( kWebSocketNormalClosure ) , IsOk ( ) ) ; EXPECT_EQ ( ERR_WS_PROTOCOL_ERROR , WebSocketErrorToNetError ( kWebSocketErrorProtocolError ) ) ; EXPECT_EQ ( ERR_MSG_TOO_BIG , WebSocketErrorToNetError ( kWebSocketErrorMessageTooBig ) ) ; EXPECT_EQ ( ERR_CONNECTION_CLOSED , WebSocketErrorToNetError ( kWebSocketErrorNoStatusReceived ) ) ; EXPECT_EQ ( ERR_SSL_PROTOCOL_ERROR , WebSocketErrorToNetError ( kWebSocketErrorTlsHandshake ) ) ; }
Confirm that the principle classes of errors are converted correctly.
Confirm that the principle classes of errors are converted correctly .