Per http://www.w3.org/TR/raw-sockets/#readystate, the readyState is of type enumerator. Rather than update the test arbitrary, please report an implementation bug to developer.