mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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
|
@ -28859,7 +28859,16 @@
|
||||||
},
|
},
|
||||||
"local_changes": {
|
"local_changes": {
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"items": {},
|
"items": {
|
||||||
|
"testharness": {
|
||||||
|
"websockets/Close-clamp.htm": [
|
||||||
|
{
|
||||||
|
"path": "websockets/Close-clamp.htm",
|
||||||
|
"url": "/websockets/Close-clamp.htm"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"reftest_nodes": {}
|
"reftest_nodes": {}
|
||||||
},
|
},
|
||||||
"reftest_nodes": {
|
"reftest_nodes": {
|
||||||
|
|
5
tests/wpt/metadata/websockets/Close-clamp.htm.ini
Normal file
5
tests/wpt/metadata/websockets/Close-clamp.htm.ini
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[Close-clamp.htm]
|
||||||
|
type: testharness
|
||||||
|
[WebSocket#close(2**16+1000)]
|
||||||
|
expected: FAIL
|
||||||
|
|
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