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 --- testing/web-platform/tests/lifecycle/META.yml | 3 + .../lifecycle/child-display-none.tentative.html | 36 ++++++++++ .../lifecycle/child-out-of-viewport.tentative.html | 36 ++++++++++ testing/web-platform/tests/lifecycle/freeze.html | 75 +++++++++++++++++++ .../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 ++++++++++++++++++++++ .../set-composited-layer-position-ref.html | 18 +++++ .../lifecycle/set-composited-layer-position.html | 45 ++++++++++++ .../lifecycle/worker-dispay-none.tentative.html | 66 +++++++++++++++++ 14 files changed, 448 insertions(+) create mode 100644 testing/web-platform/tests/lifecycle/META.yml create mode 100644 testing/web-platform/tests/lifecycle/child-display-none.tentative.html create mode 100644 testing/web-platform/tests/lifecycle/child-out-of-viewport.tentative.html create mode 100644 testing/web-platform/tests/lifecycle/freeze.html 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 create mode 100644 testing/web-platform/tests/lifecycle/set-composited-layer-position-ref.html create mode 100644 testing/web-platform/tests/lifecycle/set-composited-layer-position.html create mode 100644 testing/web-platform/tests/lifecycle/worker-dispay-none.tentative.html (limited to 'testing/web-platform/tests/lifecycle') diff --git a/testing/web-platform/tests/lifecycle/META.yml b/testing/web-platform/tests/lifecycle/META.yml new file mode 100644 index 0000000000..abd5e0f6ed --- /dev/null +++ b/testing/web-platform/tests/lifecycle/META.yml @@ -0,0 +1,3 @@ +spec: https://wicg.github.io/page-lifecycle/ +suggested_reviewers: + - fmeawad diff --git a/testing/web-platform/tests/lifecycle/child-display-none.tentative.html b/testing/web-platform/tests/lifecycle/child-display-none.tentative.html new file mode 100644 index 0000000000..d4ca6dab1e --- /dev/null +++ b/testing/web-platform/tests/lifecycle/child-display-none.tentative.html @@ -0,0 +1,36 @@ + + +Child frame marked as frozen + + + + + diff --git a/testing/web-platform/tests/lifecycle/child-out-of-viewport.tentative.html b/testing/web-platform/tests/lifecycle/child-out-of-viewport.tentative.html new file mode 100644 index 0000000000..4d8f868bfb --- /dev/null +++ b/testing/web-platform/tests/lifecycle/child-out-of-viewport.tentative.html @@ -0,0 +1,36 @@ + + +Child frame marked as frozen + + + +
+ + diff --git a/testing/web-platform/tests/lifecycle/freeze.html b/testing/web-platform/tests/lifecycle/freeze.html new file mode 100644 index 0000000000..a2a9a7d3f1 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/freeze.html @@ -0,0 +1,75 @@ + + +TestDriver freeze method + + + + 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

+ + + + diff --git a/testing/web-platform/tests/lifecycle/set-composited-layer-position-ref.html b/testing/web-platform/tests/lifecycle/set-composited-layer-position-ref.html new file mode 100644 index 0000000000..600de56d60 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/set-composited-layer-position-ref.html @@ -0,0 +1,18 @@ + + + +Setting composited layer position paints properly + + + + +
+ + + + + + diff --git a/testing/web-platform/tests/lifecycle/worker-dispay-none.tentative.html b/testing/web-platform/tests/lifecycle/worker-dispay-none.tentative.html new file mode 100644 index 0000000000..0bcfde6d17 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/worker-dispay-none.tentative.html @@ -0,0 +1,66 @@ + + +Child frame with worker marked as frozen + + + + + -- cgit v1.2.3