• Patrik Höglund's avatar
    Reland: Replacing the last addExpectedEvent with promises. · a3a4cd96
    Patrik Höglund authored
    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: default avatarGuido Urdaneta <guidou@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#519695}
    a3a4cd96
webrtc_test_utilities.js 7.35 KB