| Index: chrome/browser/extensions/api/socket/socket_api_unittest.cc
|
| diff --git a/chrome/browser/extensions/api/socket/socket_api_unittest.cc b/chrome/browser/extensions/api/socket/socket_api_unittest.cc
|
| index 1fd256ebeaef751de315a50f7c51dc506a28fce2..5157fd1fa25c011e5b57d85c2151e5b3b0836e70 100644
|
| --- a/chrome/browser/extensions/api/socket/socket_api_unittest.cc
|
| +++ b/chrome/browser/extensions/api/socket/socket_api_unittest.cc
|
| @@ -49,4 +49,15 @@ TEST_F(SocketUnitTest, Create) {
|
| ASSERT_TRUE(result.get());
|
| }
|
|
|
| +TEST_F(SocketUnitTest, InvalidPort) {
|
| + const std::string kError = "Port must be a value between 0 and 65535.";
|
| +
|
| + SocketConnectFunction* connect_function = new SocketConnectFunction();
|
| + EXPECT_EQ(kError,
|
| + RunFunctionAndReturnError(connect_function, "[1, \"foo\", -1]"));
|
| + SocketBindFunction* bind_function = new SocketBindFunction();
|
| + EXPECT_EQ(kError,
|
| + RunFunctionAndReturnError(bind_function, "[1, \"foo\", -1]"));
|
| +}
|
| +
|
| } // namespace extensions
|
|
|