https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 899931dc1b89f5fd468548cd7dd25303ba0bcda3 authored by Bon-Yong Lee on 12 April 2014, 06:47:42 UTC
Test that the attached callback is only called in a browsing context.
Tip revision: 899931d
007.html
<!doctype html>
<title>WebSockets: new WebSocket(url, null char)</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../constants.js?pipe=sub></script>
<div id=log></div>
<script>
test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/", 'a'+String.fromCharCode(0)+'b')})});
</script>
back to top