blob: 279e0c5806f9dfa824d05dafb0b3d3b31b68dcd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!doctype html>
<title>WebSockets: setting on*</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../../../constants.js?pipe=sub></script>
<meta name="variant" content="">
<meta name="variant" content="?wss">
<div id=log></div>
<script>
var events = ['open', 'message', 'error', 'close'];
for (var i = 0; i < events.length; ++i) {
test(function(){
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
var foo = function () {};
ws['on'+events[i]] = foo;
assert_equals(ws['on'+events[i]], foo);
});
}
</script>
|