Reland: Replacing the last addExpectedEvent with promises.
This concludes the refactoring. The tests now have a MUCH clearer control flow, and test success is no longer handled behind the scenes. I found that it's better to keep promise chains as long as possible, since we can then append a single .catch(failTest) at the end. This isn't strictly necessary - the test will time out since an error will break the promise chain and not call reportTestSuccess, but it's much nicer if the test fails right away on exceptions, rather than timing out after 45 seconds. Bug: chromium:777857 Change-Id: I46c110782488bb20cdf7101690ca6966601506f2 Reviewed-on: https://chromium-review.googlesource.com/793153 Commit-Queue: Patrik Höglund <phoglund@chromium.org> Reviewed-by:Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#519695}
Showing
This diff is collapsed.
Please register or sign in to comment