Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // This is essentially a debug mode crashtest to make sure everything
2 // involved in a reload runs on the right thread. It relies on the
3 // assertions in necko.
5 var listener = {
6 onStartRequest: function test_onStartR(request, ctx) {
7 },
9 onDataAvailable: function test_ODA() {
10 do_throw("Should not get any data!");
11 },
13 onStopRequest: function test_onStopR(request, ctx, status) {
14 do_test_finished();
15 },
16 };
18 function run_test() {
19 var ios = Cc["@mozilla.org/network/io-service;1"].
20 getService(Ci.nsIIOService);
21 var chan = ios.newChannel("http://localhost:4444", "", null);
22 chan.loadFlags = Ci.nsIRequest.LOAD_FRESH_CONNECTION |
23 Ci.nsIChannel.LOAD_INITIAL_DOCUMENT_URI;
24 chan.QueryInterface(Ci.nsIHttpChannel);
25 chan.asyncOpen(listener, null);
26 do_test_pending();
27 }