From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../tests/lifecycle/resources/beacon.py | 25 +++++++ .../tests/lifecycle/resources/child.html | 15 ++++ .../tests/lifecycle/resources/subframe.html | 16 +++++ .../tests/lifecycle/resources/subframe_worker.html | 17 +++++ .../tests/lifecycle/resources/subframe_worker1.js | 7 ++ .../tests/lifecycle/resources/subframe_worker2.js | 5 ++ .../tests/lifecycle/resources/window.html | 84 ++++++++++++++++++++++ 7 files changed, 169 insertions(+) create mode 100644 testing/web-platform/tests/lifecycle/resources/beacon.py create mode 100644 testing/web-platform/tests/lifecycle/resources/child.html create mode 100644 testing/web-platform/tests/lifecycle/resources/subframe.html create mode 100644 testing/web-platform/tests/lifecycle/resources/subframe_worker.html create mode 100644 testing/web-platform/tests/lifecycle/resources/subframe_worker1.js create mode 100644 testing/web-platform/tests/lifecycle/resources/subframe_worker2.js create mode 100644 testing/web-platform/tests/lifecycle/resources/window.html (limited to 'testing/web-platform/tests/lifecycle/resources') diff --git a/testing/web-platform/tests/lifecycle/resources/beacon.py b/testing/web-platform/tests/lifecycle/resources/beacon.py new file mode 100644 index 0000000000..09915ffbcf --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/beacon.py @@ -0,0 +1,25 @@ +def main(request, response): + + # |token| should be a unique UUID request parameter for the duration of this + # request. It will get stored in the server stash and will be used later in + # a query request. + # |query| should be a request parameter indicating the request would like + # to know how many times the server has seen the request (with the + # same token). + token = request.GET.first(b"token", None) + is_query = request.GET.first(b"query", None) is not None + with request.server.stash.lock: + value = request.server.stash.take(token) + count = 0 + if value is not None: + count = int(value) + if is_query: + request.server.stash.put(token, count) + else: + count += 1 + request.server.stash.put(token, count) + + headers = [] + if is_query: + headers = [(b"Count", count)] + return (200, headers, b"") diff --git a/testing/web-platform/tests/lifecycle/resources/child.html b/testing/web-platform/tests/lifecycle/resources/child.html new file mode 100644 index 0000000000..708bbfe02d --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/child.html @@ -0,0 +1,15 @@ + + +Frozen Child iframe + + + + diff --git a/testing/web-platform/tests/lifecycle/resources/subframe.html b/testing/web-platform/tests/lifecycle/resources/subframe.html new file mode 100644 index 0000000000..2f1d70a80a --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/subframe.html @@ -0,0 +1,16 @@ + + + diff --git a/testing/web-platform/tests/lifecycle/resources/subframe_worker.html b/testing/web-platform/tests/lifecycle/resources/subframe_worker.html new file mode 100644 index 0000000000..350d27437a --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/subframe_worker.html @@ -0,0 +1,17 @@ + + + diff --git a/testing/web-platform/tests/lifecycle/resources/subframe_worker1.js b/testing/web-platform/tests/lifecycle/resources/subframe_worker1.js new file mode 100644 index 0000000000..2d13e89065 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/subframe_worker1.js @@ -0,0 +1,7 @@ +var bc = new BroadcastChannel('subworker_channel'); + +setInterval(() => { + bc.postMessage('subworker'); +}, 10); + +w2 = new Worker("subframe_worker2.js"); diff --git a/testing/web-platform/tests/lifecycle/resources/subframe_worker2.js b/testing/web-platform/tests/lifecycle/resources/subframe_worker2.js new file mode 100644 index 0000000000..32d2741331 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/subframe_worker2.js @@ -0,0 +1,5 @@ +var bc = new BroadcastChannel('subworker_channel'); + +setInterval(() => { + bc.postMessage('subworker2'); +}, 10); diff --git a/testing/web-platform/tests/lifecycle/resources/window.html b/testing/web-platform/tests/lifecycle/resources/window.html new file mode 100644 index 0000000000..58181f32da --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/window.html @@ -0,0 +1,84 @@ + + +Frozen Window + + + + +

This window will be frozen

+ + + + -- cgit v1.2.3