1 // Tests that domains longer than 253 characters fail to load when pref is true
3 add_task(async
function test_long_domain_fails() {
4 let domain
= "http://" + "a".repeat(254);
6 let req
= await
new Promise(resolve
=> {
7 let chan
= NetUtil
.newChannel({
9 loadUsingSystemPrincipal
: true,
11 chan
.asyncOpen(new ChannelListener(resolve
, null, CL_EXPECT_FAILURE
));
13 Assert
.equal(req
.status
, Cr
.NS_ERROR_UNKNOWN_HOST
, "Request should fail");