mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
58ad28120e
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.
12 lines
400 B
JavaScript
12 lines
400 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
function run_test() {
|
|
let env = Components.classes["@mozilla.org/process/environment;1"]
|
|
.getService(Components.interfaces.nsIEnvironment);
|
|
do_check_throws_nsIException(function () {
|
|
env.QueryInterface(Components.interfaces.nsIFile);
|
|
}, "NS_NOINTERFACE");
|
|
}
|
|
|