NEW 189255
Web Inspector: InspectorTest.expectException should work with SyncTestSuite
https://bugs.webkit.org/show_bug.cgi?id=189255
Summary Web Inspector: InspectorTest.expectException should work with SyncTestSuite
Matt Baker
Reported 2018-09-03 20:34:19 PDT
TestHarness.expectException returns a Promise, making it unsuitable for synchronous tests. There are a couple of options: 1) Do nothing: write tests that need expectException as async tests. 2) Create a separate synchronous version of expectException, with a new name. 3) Have expectException alter its behavior based on the return value of the `work` function. Option 1 feels oppressive. Option 2 is unsightly, but straightforward. Option 3 is elegant, but obtuse and potentially surprising. I'm leaning toward 2.
Attachments
Note You need to log in before you can comment on or make changes to this bug.