Description[tests] Fix bogus uses of assertThrows.
Some tests passed a string as second argument to assertThrows, expecting it to
be matched against the exception. However, assertThrows simply ignored these.
(Some other tests actually seem to use that argument as a comment ...)
This CL
- changes assertThrows to fail if the second argument is not a function,
- adds assertThrowsEquals which compares the exception to a given value using
assertEquals
- fixes some bogus tests that got exposed by this.
R=jarin@chromium.org
BUG=
Committed: https://crrev.com/837900ef24dcfaa94fcd6cb3ae00c69f717f4e21
Cr-Commit-Position: refs/heads/master@{#33159}
Patch Set 1 #Patch Set 2 : Rebase #
Messages
Total messages: 8 (3 generated)
|