Bug 231327

Summary: Rewrite LayoutTests/plugins/object-onfocus-mutation-crash.html to stop relying on autofocus
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 203139    
Attachments:
Description Flags
Patch
cdumez: review+
[fast-cq] Patch none

Description Tim Nguyen (:ntim) 2021-10-06 13:21:01 PDT
This test mostly tests onfocus and <object>, we don't need it to use autofocus. The new autofocus timing will be async so we don't want this test to break with the new autofocus behavior implemented.
Comment 1 Tim Nguyen (:ntim) 2021-10-06 13:21:42 PDT
See also bug 231219 for similar changes in other tests.
Comment 2 Tim Nguyen (:ntim) 2021-10-06 13:25:04 PDT
Created attachment 440428 [details]
Patch
Comment 3 Chris Dumez 2021-10-06 13:29:07 PDT
Comment on attachment 440428 [details]
Patch

This seems to completely disable the test. This test was introduced to cover a code change in HTMLObjectElement/HTMLPlugInImageElement and it is no longer covered since you're dropping the object element..
Comment 4 Chris Dumez 2021-10-06 13:35:28 PDT
Comment on attachment 440428 [details]
Patch

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

> LayoutTests/plugins/object-onfocus-mutation-crash.html:4
> +<object data="a">

Oh, I misread. You merely moved the <object>

> LayoutTests/plugins/object-onfocus-mutation-crash.html:22
> +    finish();

Any reason we can't keep calling finish asynchronously?
Comment 5 Tim Nguyen (:ntim) 2021-10-06 13:36:37 PDT
(In reply to Chris Dumez from comment #4)
> Comment on attachment 440428 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=440428&action=review
> 
> > LayoutTests/plugins/object-onfocus-mutation-crash.html:4
> > +<object data="a">
> 
> Oh, I misread. You merely moved the <object>
> 
> > LayoutTests/plugins/object-onfocus-mutation-crash.html:22
> > +    finish();
> 
> Any reason we can't keep calling finish asynchronously?

No reason, just looks cleaner without the setTimeout, but I can add it back.
Comment 6 Tim Nguyen (:ntim) 2021-10-06 13:39:48 PDT
Created attachment 440434 [details]
[fast-cq] Patch
Comment 7 Tim Nguyen (:ntim) 2021-10-06 13:47:25 PDT
Committed r283657 (242602@main): <https://commits.webkit.org/242602@main>
Comment 8 Radar WebKit Bug Importer 2021-10-06 13:48:22 PDT
<rdar://problem/83950034>