From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tests/websockets/opening-handshake/001.html | 20 ++++++++++++++++ .../tests/websockets/opening-handshake/002.html | 24 +++++++++++++++++++ .../opening-handshake/003-sets-origin.worker.js | 17 ++++++++++++++ .../tests/websockets/opening-handshake/003.html | 27 ++++++++++++++++++++++ .../tests/websockets/opening-handshake/005.html | 25 ++++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 testing/web-platform/tests/websockets/opening-handshake/001.html create mode 100644 testing/web-platform/tests/websockets/opening-handshake/002.html create mode 100644 testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js create mode 100644 testing/web-platform/tests/websockets/opening-handshake/003.html create mode 100644 testing/web-platform/tests/websockets/opening-handshake/005.html (limited to 'testing/web-platform/tests/websockets/opening-handshake') diff --git a/testing/web-platform/tests/websockets/opening-handshake/001.html b/testing/web-platform/tests/websockets/opening-handshake/001.html new file mode 100644 index 0000000000..cbc0355e2b --- /dev/null +++ b/testing/web-platform/tests/websockets/opening-handshake/001.html @@ -0,0 +1,20 @@ + +WebSockets: invalid handshake + + + + + + +
+ diff --git a/testing/web-platform/tests/websockets/opening-handshake/002.html b/testing/web-platform/tests/websockets/opening-handshake/002.html new file mode 100644 index 0000000000..27b85602d4 --- /dev/null +++ b/testing/web-platform/tests/websockets/opening-handshake/002.html @@ -0,0 +1,24 @@ + +WebSockets: valid handshake + + + + + + + +
+ diff --git a/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js b/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js new file mode 100644 index 0000000000..d10e8cb4c4 --- /dev/null +++ b/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js @@ -0,0 +1,17 @@ +importScripts("/resources/testharness.js"); +importScripts('../constants.sub.js'); + +async_test(function(t) { + var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/origin'); + ws.onmessage = t.step_func(function(e) { + assert_equals(e.data, location.protocol+'//'+location.host); + ws.onclose = t.step_func(function(e) { + assert_equals(e.wasClean, true); + ws.onclose = t.unreached_func(); + t.step_timeout(() => t.done(), 50); + }) + ws.close(); + }) + ws.onerror = ws.onclose = t.unreached_func(); +}, "origin set in a Worker"); +done(); diff --git a/testing/web-platform/tests/websockets/opening-handshake/003.html b/testing/web-platform/tests/websockets/opening-handshake/003.html new file mode 100644 index 0000000000..f21219f5b5 --- /dev/null +++ b/testing/web-platform/tests/websockets/opening-handshake/003.html @@ -0,0 +1,27 @@ + + +WebSockets: origin + + + + + + +
+ diff --git a/testing/web-platform/tests/websockets/opening-handshake/005.html b/testing/web-platform/tests/websockets/opening-handshake/005.html new file mode 100644 index 0000000000..219760c518 --- /dev/null +++ b/testing/web-platform/tests/websockets/opening-handshake/005.html @@ -0,0 +1,25 @@ + +WebSockets: response header and close frame in same packet + + + + + +
+ -- cgit v1.2.3