Bug 180626

Summary: Web Inspector: support async setup() and async teardown() in AsyncTestSuite
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, hi, inspector-bugzilla-changes, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Fix
none
Proposed Fix none

Description BJ Burg 2017-12-09 13:47:56 PST
I found a use for this.
Comment 1 BJ Burg 2017-12-09 13:52:45 PST
Created attachment 328916 [details]
Proposed Fix
Comment 2 Timothy Hatcher 2017-12-11 15:07:23 PST
Comment on attachment 328916 [details]
Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Test/TestSuite.js:142
> +                    if (testcase.test[Symbol.toStringTag] === "AsyncFunction")

So if test case.test() is async, then we assume testcase.setup() is too? Or should this test testcase.setup[Symbol.toStringTag]? Assert here one way or another?

> Source/WebInspectorUI/UserInterface/Test/TestSuite.js:163
> +                    if (testcase.test[Symbol.toStringTag] === "AsyncFunction")

Ditto for testcase.teardown().
Comment 3 BJ Burg 2017-12-11 21:45:02 PST
(In reply to Timothy Hatcher from comment #2)
> Comment on attachment 328916 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=328916&action=review
> 
> > Source/WebInspectorUI/UserInterface/Test/TestSuite.js:142
> > +                    if (testcase.test[Symbol.toStringTag] === "AsyncFunction")
> 
> So if test case.test() is async, then we assume testcase.setup() is too? Or
> should this test testcase.setup[Symbol.toStringTag]? Assert here one way or
> another?
> 
> > Source/WebInspectorUI/UserInterface/Test/TestSuite.js:163
> > +                    if (testcase.test[Symbol.toStringTag] === "AsyncFunction")
> 
> Ditto for testcase.teardown().

Ooh, copypasta. It's supposed to be .setup and .teardown.
Comment 4 BJ Burg 2017-12-12 14:07:07 PST
Created attachment 329152 [details]
Proposed Fix
Comment 5 WebKit Commit Bot 2017-12-12 16:31:18 PST
Comment on attachment 329152 [details]
Proposed Fix

Clearing flags on attachment: 329152

Committed r225820: <https://trac.webkit.org/changeset/225820>
Comment 6 WebKit Commit Bot 2017-12-12 16:31:19 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-12-12 16:32:44 PST
<rdar://problem/36008686>