chromium/third_party/blink/web_tests/http/tests/websocket/handshake-challenge-randomness.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<script src="/js-test-resources/js-test.js"></script>
<script src="resources/get-request-header.js"></script>
<script>
description('Handshake request should contain random challenge values.');

window.jsTestIsAsync = true;

var challenge1;
var challenge2;

Promise.all([connectAndGetRequestHeader("sec-websocket-key"), connectAndGetRequestHeader("sec-websocket-key")]).then(function(values)
{
    challenge1 = values[0];
    challenge2 = values[1];
    shouldBeFalse('challenge1 === challenge2');
    if (challenge1 === challenge2)
        debug('challenge was ' + challenge1);
    finishJSTest();
}, finishAsFailed);

</script>