Skip to content

Commit 3bd92c0

Browse files
mfreed7Chromium LUCI CQ
authored and
Chromium LUCI CQ
committed
Change expectation for invalid/missing shadowRootMode IDL to null
Per the spec discussion: whatwg/html#5465 (comment) 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4954120 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1213658}
1 parent 42e0dab commit 3bd92c0

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
This is a testharness.js-based test.
2+
[PASS] Declarative Shadow DOM: Basic test
3+
[PASS] Declarative Shadow DOM: Feature detection
4+
[FAIL] Shadowrootmode reflection
5+
assert_equals: Invalid values map to empty string expected (string) "" but got (object) null
6+
[PASS] Declarative Shadow DOM: Fragment parser basic test
7+
[PASS] Declarative Shadow DOM: Invalid shadow root attribute
8+
[PASS] Declarative Shadow DOM: Closed shadow root attribute
9+
[PASS] Declarative Shadow DOM: Missing closing tag
10+
[PASS] Declarative Shadow DOM: delegates focus attribute
11+
[PASS] Declarative Shadow DOM: Multiple roots
12+
[PASS] Declarative Shadow DOM: template containing declarative shadow root
13+
[PASS] Declarative Shadow DOM: template containing (deeply nested) declarative shadow root
14+
[PASS] Declarative Shadow DOM: template containing a template containing declarative shadow root
15+
[PASS] Declarative Shadow DOM: template containing declarative shadow root and UA shadow root
16+
[PASS] Declarative Shadow DOM: template containing closed declarative shadow root and UA shadow root
17+
[PASS] Declarative Shadow DOM: template root element
18+
Harness: the test ran to completion.
19+

Diff for: third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-basic.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
t.setAttribute('shadowrootmode','OpEn');
4040
assert_equals(t.shadowRootMode,'open','Case insensitive');
4141
t.setAttribute('shadowrootmode','INVALID');
42-
assert_equals(t.shadowRootMode,null,'Invalid values map to null');
42+
assert_equals(t.shadowRootMode,'','Invalid values map to empty string');
4343
t.removeAttribute('shadowrootmode');
44-
assert_equals(t.shadowRootMode,null,'No shadowrootmode attribute maps to null');
44+
assert_equals(t.shadowRootMode,'','No shadowrootmode attribute maps to empty string');
4545
}, 'Shadowrootmode reflection');
4646

4747
test(() => {

0 commit comments

Comments
 (0)