gecko-dev/testing/xpcshell/example/unit/test_check_nsIException_failing.js
Jim Blandy 58ad28120e Bug 899757: Make nsServerSocket::InitWithAddress provide more detailed error results. r=mayhemer, r=ted
I looked through the NSPR socket creation functions that InitWithAddress
uses to see which errors they could return, and placed appropriate comments
in ErrorAccordingToNSPR.

The test coverage is not great; in particular, I wasn't able to find a way
to elicit "address in use" errors from Windows (although I could from
Linux); the web says that Windows is much more relaxed about binding
listening sockets than Unix derivatives. I'm interested in suggestions.
2013-09-06 08:06:22 -07:00

10 lines
266 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function run_test() {
do_check_throws_nsIException(function () {
throw Error("I find your relaxed dishabille unpalatable");
}, "NS_NOINTERFACE");
}