https://github.com/web-platform-tests/wpt
Raw File
Tip revision: feb7605d5a63e27fccc1b7684b7a5f8f21bc0cf3 authored by James Graham on 24 April 2014, 11:15:33 UTC
Stop using w3c-test.org for progress-events test
Tip revision: feb7605
Create-Secure-verify-url-set-default-port.htm
<!DOCTYPE html>
<html>
<head>
    <title>W3C WebSocket API - Create Secure WebSocket - wsocket.url is set correctly - default port</title>
    <script type="text/javascript" src="/resources/testharness.js"></script>
    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
    <script type="text/javascript" src="websocket.js?pipe=sub"></script>
</head>
<body>
    <div id="log"></div>
    <script type="text/javascript">
        test(function () {
            //
            // The w3c-test web server is already running on port 443 so the Jetty server runs on 8443
            //
            // This blocks testing this part of the specification.
            // So as a simple work around use the html5 labs public Jetty
            //
            wsocket = new WebSocket("wss://html5labs-interop.cloudapp.net:443/echo");
            var urlNormalized = "wss://html5labs-interop.cloudapp.net/echo";
            assert_equals(wsocket.url, urlNormalized, "wsocket.url is set correctly");
            wsocket.close();
        }, "W3C WebSocket API - Create Secure WebSocket - wsocket.url should be set correctly")            
    </script>
</body>
</html>
back to top