The setter of binaryType attribute in WebSocket should raise the exception.
https://bugs.webkit.org/show_bug.cgi?id=135874
Patch by Jinwoo Jeong <jw00.jeong@samsung.com> on 2016-03-20
Reviewed by Antonio Gomes.
Source/WebCore:
According to W3C WebSocket Specification, <https://www.w3.org/TR/2012/CR-websockets-
20120920/>
when an invalid value is set on binaryType of WebSocket, a SyntaxError should be raised.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::setBinaryType): Add a parameter to set an exception.
* Modules/websockets/WebSocket.h: Ditto.
* Modules/websockets/WebSocket.idl: Update that setter of binaryType could raise an exception.
LayoutTests:
According to W3C WebSocket Specification, <https://www.w3.org/TR/2012/CR-websockets-
20120920/>,
when an invalid value is set on binaryType of WebSocket, a SyntaxError should be raised.
* http/tests/websocket/tests/hybi/binary-type.html: Catch a syntax exception when binary type is set with invalid values.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198482
268f45cc-cd09-0410-ab3c-
d52691b4dbfc