Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error catching logic of should().throw() in audit.js #12606

Merged
merged 1 commit into from
Aug 31, 2018

Commits on Aug 30, 2018

  1. Fix the error catching logic of should().throw() in audit.js

    Context: #12606
    
    Change the logic of should.throw() so we can handle 3 cases -
    
    should(someExpression).throw();
    should(someExpression).throw(TypeError);
    should(someExpression).throw(DOMException, 'NotSupportedError');
    
    The generic error (except for DOMException) can be passed without
    the second argument, but this change will enforce the second arg
    when the expected error is a DOMException type.
    
    This touches many test files, so the work will be done in several
    steps:
    
    1. Change audit.js, audionodeoptions.js on both locations.
      (wpt, non-wpt)
    2. Update affected test files with the script.
    3. Update the rest of test files which can't be updated
      programmatically.
    
    Bug: 865614
    Test: All layout tests pass.
    Change-Id: I16acacb26c194a0ff950aca05e931195bf55167f
    Reviewed-on: https://chromium-review.googlesource.com/1184146
    Commit-Queue: Hongchan Choi <[email protected]>
    Reviewed-by: Raymond Toy <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#587660}
    hoch authored and Chrome-bot committed Aug 30, 2018
    Configuration menu
    Copy the full SHA
    91a7ab3 View commit details
    Browse the repository at this point in the history