From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../the-autofocus-attribute/autofocus-dialog.html | 29 ++++++++ .../autofocus-in-not-fully-active-document.html | 16 +++++ .../autofocus-on-stable-document.html | 21 ++++++ .../document-with-fragment-empty.html | 31 ++++++++ .../document-with-fragment-nonexistent.html | 31 ++++++++ .../document-with-fragment-top.html | 34 +++++++++ .../document-with-fragment-valid.html | 57 +++++++++++++++ .../the-autofocus-attribute/first-reconnected.html | 22 ++++++ .../first-when-later-but-before.html | 26 +++++++ .../the-autofocus-attribute/first-when-later.html | 26 +++++++ .../focus/the-autofocus-attribute/first.html | 24 +++++++ .../focusable-area-in-top-document.html | 24 +++++++ .../no-autofocus-on-changing-input-type.html | 27 +++++++ .../no-cross-origin-autofocus.html | 44 ++++++++++++ .../no-sandboxed-automatic-features.html | 17 +++++ .../the-autofocus-attribute/not-on-first-task.html | 22 ++++++ .../queue-non-focusable.html | 20 ++++++ .../resources/child-autofocus.html | 20 ++++++ .../resources/child-iframe.html | 18 +++++ .../resources/erase-first.css | 3 + .../resources/frame-with-a.html | 4 ++ .../resources/frame-with-anchor.html | 4 ++ .../resources/frame-with-autofocus-element.html | 5 ++ .../resources/grand-child-autofocus.html | 18 +++++ .../resources/imagemap.html | 5 ++ .../resources/moving-autofocus-to-parent.html | 10 +++ .../the-autofocus-attribute/resources/utils.js | 51 +++++++++++++ .../same-origin-autofocus.html | 48 +++++++++++++ .../skip-another-top-level-browsing-context.html | 17 +++++ .../skip-non-focusable.html | 19 +++++ .../skip-not-fully-active.html | 18 +++++ .../spin-by-blocking-style-sheet.html | 19 +++++ .../supported-elements.html | 83 ++++++++++++++++++++++ .../update-the-rendering.html | 40 +++++++++++ 34 files changed, 853 insertions(+) create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-in-not-fully-active-document.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-on-stable-document.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-top.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-reconnected.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/focusable-area-in-top-document.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-autofocus-on-changing-input-type.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-cross-origin-autofocus.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-sandboxed-automatic-features.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/queue-non-focusable.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-autofocus.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-iframe.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/erase-first.css create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-a.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-anchor.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-autofocus-element.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/grand-child-autofocus.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/imagemap.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/moving-autofocus-to-parent.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/utils.js create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/same-origin-autofocus.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-non-focusable.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-not-fully-active.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/spin-by-blocking-style-sheet.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/supported-elements.html create mode 100644 testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html (limited to 'testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute') diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html new file mode 100644 index 0000000000..08a0913f42 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-in-not-fully-active-document.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-in-not-fully-active-document.html new file mode 100644 index 0000000000..a26a44dbfb --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-in-not-fully-active-document.html @@ -0,0 +1,16 @@ + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-on-stable-document.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-on-stable-document.html new file mode 100644 index 0000000000..47e3e3fd0a --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/autofocus-on-stable-document.html @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html new file mode 100644 index 0000000000..ec9d16d498 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent.html new file mode 100644 index 0000000000..3f2dcc4167 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-top.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-top.html new file mode 100644 index 0000000000..f2d2aaae60 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-top.html @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html new file mode 100644 index 0000000000..5078f1a0ac --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html @@ -0,0 +1,57 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-reconnected.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-reconnected.html new file mode 100644 index 0000000000..99ee9198d1 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-reconnected.html @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html new file mode 100644 index 0000000000..f361463401 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html @@ -0,0 +1,26 @@ + + +The temporally first autofocus in the document wins, even if an element is inserted later that is previous in the document tree + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later.html new file mode 100644 index 0000000000..1d64b863a1 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first-when-later.html @@ -0,0 +1,26 @@ + + +The first autofocus in the document wins, even if elements are inserted later + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first.html new file mode 100644 index 0000000000..02ebb79a3e --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/first.html @@ -0,0 +1,24 @@ + + +The first autofocus in the document wins + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/focusable-area-in-top-document.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/focusable-area-in-top-document.html new file mode 100644 index 0000000000..327040eeee --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/focusable-area-in-top-document.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-autofocus-on-changing-input-type.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-autofocus-on-changing-input-type.html new file mode 100644 index 0000000000..79a39ef2f9 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-autofocus-on-changing-input-type.html @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-cross-origin-autofocus.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-cross-origin-autofocus.html new file mode 100644 index 0000000000..2cf7428f36 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-cross-origin-autofocus.html @@ -0,0 +1,44 @@ + + + + + + + + + + +

Autofocus shouldn't work in cross-origin iframe.

+ + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-sandboxed-automatic-features.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-sandboxed-automatic-features.html new file mode 100644 index 0000000000..991373d336 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/no-sandboxed-automatic-features.html @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html new file mode 100644 index 0000000000..ab27342f4f --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html @@ -0,0 +1,22 @@ + + +The element is not focused during the initial parsing task + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/queue-non-focusable.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/queue-non-focusable.html new file mode 100644 index 0000000000..e3b556035d --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/queue-non-focusable.html @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-autofocus.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-autofocus.html new file mode 100644 index 0000000000..afd5601a52 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-autofocus.html @@ -0,0 +1,20 @@ + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-iframe.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-iframe.html new file mode 100644 index 0000000000..f60acfc871 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/child-iframe.html @@ -0,0 +1,18 @@ + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/erase-first.css b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/erase-first.css new file mode 100644 index 0000000000..bbbcf79939 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/erase-first.css @@ -0,0 +1,3 @@ +#first { + display: none; +} diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-a.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-a.html new file mode 100644 index 0000000000..1f31736902 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-a.html @@ -0,0 +1,4 @@ + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-anchor.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-anchor.html new file mode 100644 index 0000000000..b9070159e7 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-anchor.html @@ -0,0 +1,4 @@ + + +
+ diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-autofocus-element.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-autofocus-element.html new file mode 100644 index 0000000000..985cba4149 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/frame-with-autofocus-element.html @@ -0,0 +1,5 @@ + + +
+ + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/grand-child-autofocus.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/grand-child-autofocus.html new file mode 100644 index 0000000000..88be6e0b04 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/grand-child-autofocus.html @@ -0,0 +1,18 @@ + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/imagemap.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/imagemap.html new file mode 100644 index 0000000000..fa3d95c81b --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/imagemap.html @@ -0,0 +1,5 @@ + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/moving-autofocus-to-parent.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/moving-autofocus-to-parent.html new file mode 100644 index 0000000000..fc6c298a46 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/moving-autofocus-to-parent.html @@ -0,0 +1,10 @@ + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/utils.js b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/utils.js new file mode 100644 index 0000000000..e928e27540 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/resources/utils.js @@ -0,0 +1,51 @@ +'use strict'; + +function waitForEvent(target, type, options) { + return new Promise((resolve, reject) => { + target.addEventListener(type, resolve, options); + }); +} + +function waitForAnimationFrame(w) { + let targetWindow = w || window; + return new Promise((resolve, reject) => { + targetWindow.requestAnimationFrame(resolve); + }); +} + +function waitForEvent(target, type, options) { + return new Promise((resolve, reject) => { + target.addEventListener(type, resolve, options); + }); +} + +function waitForLoad(target) { + return waitForEvent(target, 'load'); +} + +function timeOut(test, ms) { + return new Promise((resolve, reject) => { + test.step_timeout(resolve, ms); + }); +} + +// If an element with autofocus is connected to a document and this function +// is called, the autofocus result is deterministic after returning from the +// function. +// Exception: If the document has script-blocking style sheets, this function +// doesn't work well. +async function waitUntilStableAutofocusState(w) { + let targetWindow = w || window; + // Awaiting one animation frame is an easy way to determine autofocus state. + await waitForAnimationFrame(targetWindow); +} + +async function waitForIframeLoad(src, w = window) { + const iframe = w.document.createElement("iframe"); + let loadPromise = new Promise(resolve => { + iframe.addEventListener("load", () => resolve(iframe)); + }); + iframe.src = src; + w.document.body.appendChild(iframe); + return loadPromise; +} diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/same-origin-autofocus.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/same-origin-autofocus.html new file mode 100644 index 0000000000..1497a7d658 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/same-origin-autofocus.html @@ -0,0 +1,48 @@ + + + + + +autofocus in the same origin grand child iframe + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html new file mode 100644 index 0000000000..d392b903f0 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html @@ -0,0 +1,17 @@ + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-non-focusable.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-non-focusable.html new file mode 100644 index 0000000000..008371d8e1 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-non-focusable.html @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-not-fully-active.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-not-fully-active.html new file mode 100644 index 0000000000..fa5b608d05 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/skip-not-fully-active.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/spin-by-blocking-style-sheet.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/spin-by-blocking-style-sheet.html new file mode 100644 index 0000000000..fb87eca77a --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/spin-by-blocking-style-sheet.html @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/supported-elements.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/supported-elements.html new file mode 100644 index 0000000000..29b3f3fb7b --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/supported-elements.html @@ -0,0 +1,83 @@ + + + + + + diff --git a/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html new file mode 100644 index 0000000000..279f70d490 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html @@ -0,0 +1,40 @@ + + + + + + + + -- cgit v1.2.3