From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../speculative-script.tentative.html | 27 ++++++++++++++++++++++ .../syntax/speculative-charset/support/script.py | 18 +++++++++++++++ .../support/speculative-script.py | 11 +++++++++ 3 files changed, 56 insertions(+) create mode 100644 testing/web-platform/tests/html/syntax/speculative-charset/speculative-script.tentative.html create mode 100644 testing/web-platform/tests/html/syntax/speculative-charset/support/script.py create mode 100644 testing/web-platform/tests/html/syntax/speculative-charset/support/speculative-script.py (limited to 'testing/web-platform/tests/html/syntax/speculative-charset') diff --git a/testing/web-platform/tests/html/syntax/speculative-charset/speculative-script.tentative.html b/testing/web-platform/tests/html/syntax/speculative-charset/speculative-script.tentative.html new file mode 100644 index 0000000000..e665510946 --- /dev/null +++ b/testing/web-platform/tests/html/syntax/speculative-charset/speculative-script.tentative.html @@ -0,0 +1,27 @@ + + + + +Speculative script + + + + + diff --git a/testing/web-platform/tests/html/syntax/speculative-charset/support/script.py b/testing/web-platform/tests/html/syntax/speculative-charset/support/script.py new file mode 100644 index 0000000000..0dbf5be0ac --- /dev/null +++ b/testing/web-platform/tests/html/syntax/speculative-charset/support/script.py @@ -0,0 +1,18 @@ +import time + +def main(request, response): + response.add_required_headers = False # Don't implicitly add HTTP headers + response.writer.write_status(200) + response.writer.write_header("Content-Type", "text/javascript") + response.writer.end_headers() + + token = request.GET[b"uuid"] + character = request.GET[b"character"] + old_character = b"NOT LOADED PREVIOUSLY"; + from_stash = request.server.stash.take(token); + if from_stash: + old_character = from_stash + else: + request.server.stash.put(token, character) + + response.writer.write(b'parent.postMessage("token: %s, character: %s, previous character: %s, byte: \xE6", "*");' % (token, character, old_character)); diff --git a/testing/web-platform/tests/html/syntax/speculative-charset/support/speculative-script.py b/testing/web-platform/tests/html/syntax/speculative-charset/support/speculative-script.py new file mode 100644 index 0000000000..c72c469ce3 --- /dev/null +++ b/testing/web-platform/tests/html/syntax/speculative-charset/support/speculative-script.py @@ -0,0 +1,11 @@ +import time + +def main(request, response): + response.add_required_headers = False # Don't implicitly add HTTP headers + response.writer.write_status(200) + response.writer.write_header("Content-Type", "text/html") + response.writer.end_headers() + + response.writer.write(b'' % request.GET[b"uuid"]); + time.sleep(0.2) + response.writer.write(b'

Test: \xE6

'); -- cgit v1.2.3