Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | // This is essentially a debug mode crashtest to make sure everything |
michael@0 | 2 | // involved in a reload runs on the right thread. It relies on the |
michael@0 | 3 | // assertions in necko. |
michael@0 | 4 | |
michael@0 | 5 | var listener = { |
michael@0 | 6 | onStartRequest: function test_onStartR(request, ctx) { |
michael@0 | 7 | }, |
michael@0 | 8 | |
michael@0 | 9 | onDataAvailable: function test_ODA() { |
michael@0 | 10 | do_throw("Should not get any data!"); |
michael@0 | 11 | }, |
michael@0 | 12 | |
michael@0 | 13 | onStopRequest: function test_onStopR(request, ctx, status) { |
michael@0 | 14 | do_test_finished(); |
michael@0 | 15 | }, |
michael@0 | 16 | }; |
michael@0 | 17 | |
michael@0 | 18 | function run_test() { |
michael@0 | 19 | var ios = Cc["@mozilla.org/network/io-service;1"]. |
michael@0 | 20 | getService(Ci.nsIIOService); |
michael@0 | 21 | var chan = ios.newChannel("http://localhost:4444", "", null); |
michael@0 | 22 | chan.loadFlags = Ci.nsIRequest.LOAD_FRESH_CONNECTION | |
michael@0 | 23 | Ci.nsIChannel.LOAD_INITIAL_DOCUMENT_URI; |
michael@0 | 24 | chan.QueryInterface(Ci.nsIHttpChannel); |
michael@0 | 25 | chan.asyncOpen(listener, null); |
michael@0 | 26 | do_test_pending(); |
michael@0 | 27 | } |
michael@0 | 28 |