Bug 180626 - Web Inspector: support async setup() and async teardown() in AsyncTestSuite
Summary: Web Inspector: support async setup() and async teardown() in AsyncTestSuite
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-09 13:47 PST by Brian Burg
Modified: 2017-12-12 16:32 PST (History)
6 users (show)

See Also:


Attachments
Proposed Fix (14.90 KB, patch)
2017-12-09 13:52 PST, Brian Burg
no flags Details | Formatted Diff | Diff
Proposed Fix (14.81 KB, patch)
2017-12-12 14:07 PST, Brian Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2017-12-09 13:47:56 PST
I found a use for this.
Comment 1 Brian 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 Brian 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 Brian 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>