Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / netwerk / test / unit / test_bug376865.js
blob90fa1c97f5da93d34688ea9125641584065e3cc1
1 const Cc = Components.classes;
2 const Ci = Components.interfaces;
4 function run_test() {
5 var stream = Cc["@mozilla.org/io/string-input-stream;1"].
6 createInstance(Ci.nsISupportsCString);
7 stream.data = "foo bar baz";
9 var pump = Cc["@mozilla.org/network/input-stream-pump;1"].
10 createInstance(Ci.nsIInputStreamPump);
11 pump.init(stream, -1, -1, 0, 0, false);
13 // When we pass a null listener argument too asyncRead we expect it to throw
14 // instead of crashing.
15 try {
16 pump.asyncRead(null, null);
18 catch (e) {
19 return;
22 do_throw("asyncRead didn't throw when passed a null listener argument.");