mirror of
https://github.com/servo/servo.git
synced 2025-09-11 07:28:19 +01:00
Add a test for clamping in WebSocket#close.
This commit is contained in:
parent
8a6681ba70
commit
0888e1acac
3 changed files with 29 additions and 1 deletions
14
tests/wpt/web-platform-tests/websockets/Close-clamp.htm
Normal file
14
tests/wpt/web-platform-tests/websockets/Close-clamp.htm
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<title>WebSocket#close(2**16+1000)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="websocket.js?pipe=sub"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var ws = CreateWebSocket(false, false, false);
|
||||
assert_throws("InvalidAccessError", function () {
|
||||
ws.close(0x10000 + 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue