| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <script src="/js-test-resources/js-test.js"></script> |
| </head> |
| <body> |
| <div id="description"></div> |
| <div id="console"></div> |
| <script> |
| description("Test whether WebSocket ignores unsolicited negotiation response."); |
| |
| window.jsTestIsAsync = true; |
| |
| var closeEvent; |
| |
| var url = "ws://localhost:8880/permessage-deflate-unsolicited-negotiation-response"; |
| var ws = new WebSocket(url); |
| |
| ws.onopen = function() |
| { |
| debug('PASS onopen'); |
| shouldBeEqualToString('ws.extensions', 'permessage-deflate; server_max_window_bits=15; server_no_context_takeover'); |
| ws.close(); |
| } |
| |
| ws.onclose = function(event) |
| { |
| window.event = event; |
| shouldBeTrue('event.wasClean'); |
| finishJSTest(); |
| }; |
| |
| </script> |
| </body> |
| </html> |