From 7c70510d1e8601496644d6936af7230de06330fd Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Mon, 23 Oct 2023 11:05:49 -0700 Subject: [PATCH] Change expectation for invalid/missing shadowRootMode IDL to null Per the spec discussion: https://github.com/whatwg/html/pull/5465#discussion_r1360590511 this changes the expectation for the tests to be: document.createElement("template").shadowRootMode === "" rather than === null. Note that this CL does not change Chromium's behavior, and as such I cannot check if there are other tests that implicitly also do a similar check. More tests might need to change once I (or someone) implements this new behavior in a browser. Bug: 1379513 Change-Id: I0ea1371d612d524fdecc287f3f1790d601c64982 --- shadow-dom/declarative/declarative-shadow-dom-basic.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadow-dom/declarative/declarative-shadow-dom-basic.html b/shadow-dom/declarative/declarative-shadow-dom-basic.html index 5d59c9bb2f70c37..6f3739b63ca43a7 100644 --- a/shadow-dom/declarative/declarative-shadow-dom-basic.html +++ b/shadow-dom/declarative/declarative-shadow-dom-basic.html @@ -39,9 +39,9 @@ t.setAttribute('shadowrootmode','OpEn'); assert_equals(t.shadowRootMode,'open','Case insensitive'); t.setAttribute('shadowrootmode','INVALID'); - assert_equals(t.shadowRootMode,null,'Invalid values map to null'); + assert_equals(t.shadowRootMode,'','Invalid values map to empty string'); t.removeAttribute('shadowrootmode'); - assert_equals(t.shadowRootMode,null,'No shadowrootmode attribute maps to null'); + assert_equals(t.shadowRootMode,'','No shadowrootmode attribute maps to empty string'); }, 'Shadowrootmode reflection'); test(() => {