Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
/**
* Tests that pop3: and pop: URIs can be created from their spec.
*/
add_task(function test_newPop3URI() {
Assert.ok(
uri instanceof Ci.nsIMsgMailNewsUrl,
"uri should be a nsIMsgMailNewsUrl"
);
Assert.equal(uri.scheme, "pop3");
Assert.equal(uri.host, "localhost");
Assert.equal(uri.port, 1110);
});
add_task(function test_popURIRoundTrip() {
const spec =
const uri = Services.io.newURI(spec);
Assert.ok(
uri instanceof Ci.nsIMsgMailNewsUrl,
"uri should be a nsIMsgMailNewsUrl"
);
Assert.equal(uri.spec, spec, "spec should survive a round-trip");
});