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 non-ASCII chars."); | 10 description("Test WebSocket bad sub-protocol names by non-ASCII chars."); |
11 | 11 |
12 // Fails if protocol contains an character greater than U+007E. | 12 // Fails if protocol contains an character greater than U+007E. |
13 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u007F")'); | 13 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u007F")'); |
14 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0080")'); | 14 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0080")'); |
15 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u3042")'); | 15 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u3042")'); |
16 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFF")'); | 16 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFF")'); |
17 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFEFF")'); | 17 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFEFF")'); |
18 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFE")'); | 18 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFE")'); |
19 // Surrogate pairs | 19 // Surrogate pairs |
20 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uD840\uDC0B")'); | 20 shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uD840\uDC0B")'); |
21 | 21 |
22 </script> | 22 </script> |
23 </body> | 23 </body> |
24 </html> | 24 </html> |
OLD | NEW |