Bug 220768

Summary: Update LayoutTests/imported/w3c/web-platform-tests/shadow-dom to the latest
Product: WebKit Reporter: Tetsuharu Ohzeki [UTC+9] <tetsuharu.ohzeki>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: amir_mark, cdumez, clopez, ews-watchlist, rniwa, ryanhaddad, smoley, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=221486
Bug Depends on:    
Bug Blocks: 218692, 221486    
Attachments:
Description Flags
Patch
none
Patch none

Description Tetsuharu Ohzeki [UTC+9] 2021-01-20 07:50:06 PST
...
Comment 1 Tetsuharu Ohzeki [UTC+9] 2021-01-20 08:57:48 PST
I'm waiting to merge https://github.com/web-platform-tests/wpt/pull/27256
Comment 2 Radar WebKit Bug Importer 2021-01-21 16:31:26 PST
<rdar://problem/73474764>
Comment 3 Ryosuke Niwa 2021-02-04 22:13:36 PST
Reviewed & merged the upstream change.
Comment 4 Tetsuharu Ohzeki [UTC+9] 2021-02-05 06:39:44 PST
Created attachment 419397 [details]
Patch
Comment 5 Tetsuharu Ohzeki [UTC+9] 2021-02-05 06:43:17 PST
(In reply to Ryosuke Niwa from comment #3)
> Reviewed & merged the upstream change.

Thanks!
Comment 6 Tetsuharu Ohzeki [UTC+9] 2021-02-05 10:22:59 PST
Created attachment 419424 [details]
Patch
Comment 7 Ryosuke Niwa 2021-02-05 21:26:58 PST
Comment on attachment 419424 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=419424&action=review

> LayoutTests/imported/w3c/web-platform-tests/shadow-dom/nested-slot-remove-crash-expected.txt:1
> +CONSOLE MESSAGE: SyntaxError: Cannot declare a const variable twice: 'root'.

Huh, we should fix this test upstream!

> LayoutTests/imported/w3c/web-platform-tests/shadow-dom/nested-slot-remove-crash.html:30
> +  const root = host.attachShadow({mode:"open"});

This is clearly wrong.
Comment 8 EWS 2021-02-05 21:33:39 PST
Committed r272458: <https://trac.webkit.org/changeset/272458>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 419424 [details].
Comment 9 Tetsuharu Ohzeki [UTC+9] 2021-02-05 21:38:21 PST
(In reply to Ryosuke Niwa from comment #7)
> Comment on attachment 419424 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=419424&action=review
> 
> > LayoutTests/imported/w3c/web-platform-tests/shadow-dom/nested-slot-remove-crash-expected.txt:1
> > +CONSOLE MESSAGE: SyntaxError: Cannot declare a const variable twice: 'root'.
> 
> Huh, we should fix this test upstream!
> 
> > LayoutTests/imported/w3c/web-platform-tests/shadow-dom/nested-slot-remove-crash.html:30
> > +  const root = host.attachShadow({mode:"open"});
> 
> This is clearly wrong.

Thank you for your r+cq+!

I think so too and opened https://github.com/web-platform-tests/wpt/pull/27510.
But,,, I cannot see the original chromium bug and the reason. I’m not confident that this should be fixed.
(I suspect strongly this `const` is mistake)
Comment 10 Amir Mark Jr 2021-02-09 15:17:33 PST
This test is crashing after this patch was created:

imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html

Link to the bug tracking this issue:

https://bugs.webkit.org/show_bug.cgi?id=221634