diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html')
-rw-r--r-- | testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html new file mode 100644 index 0000000000..7bfe5dc784 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="resources/shadow-dom.js"></script> +<script src="resources/focus-utils.js"></script> +<div id="log"></div> +<!-- +This test case is based on the crbug.com/618587 reproduction case: +http://jsbin.com/bonudiwagu/1/edit?html,output +--> +<input id='i0'> +<div id='x-foo'> + <template data-mode='open'> + <input id='inner-before'> + <slot></slot> + <input id='inner-after'> + </template> + <div id='nested'> + <template data-mode='open'> + <input id='nested-x'> + <slot></slot> + <input id='nested-y'> + </template> + <input id='light'> + </div> +</div> +<input id='i1'> + +<script> +promise_test(async () => { + var xFoo = document.querySelector('#x-foo'); + convertTemplatesToShadowRootsWithin(xFoo); + + var elements = [ + 'i0', + 'x-foo/inner-before', + 'nested/nested-x', + 'light', + 'nested/nested-y', + 'x-foo/inner-after', + 'i1' + ]; + + await assert_focus_navigation_forward(elements); + elements.reverse(); + await assert_focus_navigation_backward(elements); +}, 'Focus controller should treat each slot as a focus scope.'); +</script> |