RESOLVED WONTFIX 164607
Web Inspector: TestSuite should pass the test case to setup/teardown
https://bugs.webkit.org/show_bug.cgi?id=164607
Summary Web Inspector: TestSuite should pass the test case to setup/teardown
Matt Baker
Reported 2016-11-10 12:20:06 PST
Summary: TestSuite should pass the test case to setup/teardown. This allows setup to associate state with the test case itself, instead of with the `window` object or within the scope of the `test()` function. This should be done for both AsyncTestSuite and SyncTestSuite.
Attachments
Radar WebKit Bug Importer
Comment 1 2016-11-10 12:22:39 PST
Matt Baker
Comment 2 2016-11-10 15:36:38 PST
Setup/teardown could just use `this` to access test case state. There are only two issues with this approach, and they both seem pretty far fetched: 1) Using `this` in arrow function for setup/teardown will bind to something other than the test case. Setup/teardown are usually inline, and if they need to be defined elsewhere (for reuse in multiple tests), a regular named function will work. 2) However unlikely, the test case itself could trample state that was created during setup.
Note You need to log in before you can comment on or make changes to this bug.