OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div id="description"></div> | 7 <div id="description"></div> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script type="text/javascript"> | 9 <script type="text/javascript"> |
10 description("Test WebSocket bad sub-protocol names by control characters."); | 10 description("Test WebSocket bad sub-protocol names by control characters."); |
11 | 11 |
12 // Fails if protocol contains an character less than U+0020. | 12 // Fails if protocol contains an character less than U+0020. |
13 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0000")'); | 13 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0000")'); |
14 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0009")'); | 14 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0009")'); |
15 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000A")'); | 15 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000A")'); |
16 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000D")'); | 16 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000D")'); |
17 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u001B")'); | 17 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u001B")'); |
18 | 18 |
19 </script> | 19 </script> |
20 </body> | 20 </body> |
21 </html> | 21 </html> |
OLD | NEW |