Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix websocket header validation, ensure it meets token requirements, add
testing
- Loading branch information
Showing
7 changed files
with
108 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/wpt/web-platform-tests/websockets/Create-asciiSep-protocol-string.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>W3C WebSocket API - Create WebSocket - ascii protocol string with separator</title> | ||
<script type="text/javascript" src="/resources/testharness.js"></script> | ||
<script type="text/javascript" src="/resources/testharnessreport.js"></script> | ||
<script type="text/javascript" src="websocket.js?pipe=sub"></script> | ||
</head> | ||
<body> | ||
<div id="log"></div> | ||
<script type="text/javascript"> | ||
if(window.WebSocket) { | ||
test(function () { | ||
var asciiWithSep = "/echo"; | ||
var wsocket; | ||
assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithAsciiSep(asciiWithSep) }); | ||
}, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with an ascii separator character - SYNTAX_ERR is thrown") | ||
} | ||
</script> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
tests/wpt/web-platform-tests/websockets/Create-protocols-repeated-case-insensitive.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>W3C WebSocket API - Create WebSocket - repeated protocols with different case</title> | ||
<script type="text/javascript" src="/resources/testharness.js"></script> | ||
<script type="text/javascript" src="/resources/testharnessreport.js"></script> | ||
<script type="text/javascript" src="websocket.js?pipe=sub"></script> | ||
</head> | ||
<body> | ||
<div id="log"></div> | ||
<script type="text/javascript"> | ||
test(function () { | ||
var wsocket; | ||
assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocolsCaseInsensitive() }); | ||
}, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values but different case - SYNTAX_ERR is thrown") | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters