I'm trying to mock a timeout from a webpage so that I can implement a "deal with timeout" feature.

Basically what I need is a URL of something that does not reply within X seconds.

Thanks in advance

Here's the code I have:

var req = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
req.overrideMimeType('text/plain; charset=utf-8');
req.open("GET", configurationURL, false);
req.variable = specificConfigurationURLTerminator;
setTimeout(function() {
    alert("aborting");
    req.abort();
}, this.configurationRetrievalTimeout);
req.send(null);
Edit
Report