• Joel Hockey's avatar
    Continue running next test when async test throws error · ef1c7e05
    Joel Hockey authored
    Currently async tests end up timing out when they call assert
    but don't catch the resulting exception and call done(true).
    
    It seems more natural that when an async test has an assertion
    failure, that the harness should catch the exception and take
    care of continuing tests.
    
    The alternative that async tests should catch there own errors
    has the drawback that specific errors are not ever reported.
    E.g. code below is bad.
    
    testAsync(done) {
      try {
        assertEquals('foo', 'bar', 'foo should match bar');
        done();
      } catch  (err) {
        done(true)
      }
    }
    
    Bug: 813477
    Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
    Change-Id: Idbc88f94f6055eec37ab0d90b4b8d423fba6eb3f
    Reviewed-on: https://chromium-review.googlesource.com/1088327Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
    Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#564806}
    ef1c7e05
webui_resource_test.js 6.57 KB