From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../declarative/declarative-shadow-dom-basic.html | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html') diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html index 8bc6bec5f5..4f174b8e5f 100644 --- a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html @@ -54,6 +54,49 @@ test(() => { t.getAttribute('shadowrootmode', 'CLOSED'); }, 'Shadowrootmode reflection, setter'); +test(() => { + const t = document.createElement('template'); + t.setAttribute('shadowrootdelegatesfocus',''); + assert_equals(t.shadowRootDelegatesFocus,true,'The shadowRootDelegatesFocus IDL should reflect the content attribute'); + t.setAttribute('shadowrootdelegatesfocus','foobar'); + assert_equals(t.shadowRootDelegatesFocus,true,'The value doesn\'t matter'); + t.removeAttribute('shadowrootdelegatesfocus'); + assert_equals(t.shadowRootDelegatesFocus,false,'No shadowRootDelegatesFocus attribute maps to false'); +}, 'Shadowrootdelegatesfocus reflection'); + +test(() => { + const t = document.createElement('template'); + assert_equals(t.getAttribute('shadowrootdelegatesfocus'), null); + t.shadowRootDelegatesFocus = true; + assert_equals(t.getAttribute('shadowrootdelegatesfocus'), ''); + assert_equals(t.shadowRootDelegatesFocus, true); + t.shadowRootDelegatesFocus = false; + assert_equals(t.getAttribute('shadowrootdelegatesfocus'), null); + assert_equals(t.shadowRootDelegatesFocus, false); +}, 'Shadowrootdelegatesfocus reflection, setter'); + + +test(() => { + const t = document.createElement('template'); + t.setAttribute('shadowrootclonable',''); + assert_equals(t.shadowRootClonable,true,'The shadowRootClonable IDL should reflect the content attribute'); + t.setAttribute('shadowrootclonable','foobar'); + assert_equals(t.shadowRootClonable,true,'The value doesn\'t matter'); + t.removeAttribute('shadowrootclonable'); + assert_equals(t.shadowRootClonable,false,'No shadowRootClonable attribute maps to false'); +}, 'Shadowrootclonable reflection'); + +test(() => { + const t = document.createElement('template'); + assert_equals(t.getAttribute('shadowrootclonable'), null); + t.shadowRootClonable = true; + assert_equals(t.getAttribute('shadowrootclonable'), ''); + assert_equals(t.shadowRootClonable, true); + t.shadowRootClonable = false; + assert_equals(t.getAttribute('shadowrootclonable'), null); + assert_equals(t.shadowRootClonable, false); +}, 'Shadowrootclonable reflection, setter'); + test(() => { const div = document.createElement('div'); div.setHTMLUnsafe(` -- cgit v1.2.3