test/jdk/java/net/httpclient/websocket/WebSocketTest.java
branchhttp-client-branch
changeset 56337 58e16ad3fb98
parent 56324 3edf200fff01
child 56341 10fcbe13cd19
equal deleted inserted replaced
56336:7f921a5a6e10 56337:58e16ad3fb98
    93         assertFails(IOE, webSocket.sendText(Support.incompleteString(), true));
    93         assertFails(IOE, webSocket.sendText(Support.incompleteString(), true));
    94         assertFails(IOE, webSocket.sendText(Support.incompleteString(), false));
    94         assertFails(IOE, webSocket.sendText(Support.incompleteString(), false));
    95         assertFails(IOE, webSocket.sendText(Support.malformedString(), true));
    95         assertFails(IOE, webSocket.sendText(Support.malformedString(), true));
    96         assertFails(IOE, webSocket.sendText(Support.malformedString(), false));
    96         assertFails(IOE, webSocket.sendText(Support.malformedString(), false));
    97 
    97 
    98         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(124)));
    98         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(124)));
    99         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(125)));
    99         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(125)));
   100         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(128)));
   100         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(128)));
   101         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(256)));
   101         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(256)));
   102         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(257)));
   102         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWithNBytes(257)));
   103         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWith2NBytes((123 / 2) + 1)));
   103         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.stringWith2NBytes((123 / 2) + 1)));
   104         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.malformedString()));
   104         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.malformedString()));
   105         assertFails(IAE, webSocket.sendClose(NORMAL_CLOSURE, Support.incompleteString()));
   105         assertFails(IOE, webSocket.sendClose(NORMAL_CLOSURE, Support.incompleteString()));
   106 
   106 
   107         assertFails(IAE, webSocket.sendClose(-2, "a reason"));
   107         assertFails(IAE, webSocket.sendClose(-2, "a reason"));
   108         assertFails(IAE, webSocket.sendClose(-1, "a reason"));
   108         assertFails(IAE, webSocket.sendClose(-1, "a reason"));
   109         assertFails(IAE, webSocket.sendClose(0, "a reason"));
   109         assertFails(IAE, webSocket.sendClose(0, "a reason"));
   110         assertFails(IAE, webSocket.sendClose(1, "a reason"));
   110         assertFails(IAE, webSocket.sendClose(1, "a reason"));