test-bug-603750-websocket.js 497 B

1234567891011121314151617181920
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* Any copyright is dedicated to the Public Domain.
  3. * http://creativecommons.org/publicdomain/zero/1.0/ */
  4. "use strict";
  5. window.addEventListener("load", function () {
  6. let ws1 = new WebSocket("ws://0.0.0.0:81");
  7. ws1.onopen = function () {
  8. ws1.send("test 1");
  9. ws1.close();
  10. };
  11. let ws2 = new window.frames[0].WebSocket("ws://0.0.0.0:82");
  12. ws2.onopen = function () {
  13. ws2.send("test 2");
  14. ws2.close();
  15. };
  16. }, false);