mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 19:37:32 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
20
netwerk/test/unit/test_bug376865.js
Normal file
20
netwerk/test/unit/test_bug376865.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function run_test() {
|
||||
var stream = Cc["@mozilla.org/io/string-input-stream;1"].
|
||||
createInstance(Ci.nsISupportsCString);
|
||||
stream.data = "foo bar baz";
|
||||
|
||||
var pump = Cc["@mozilla.org/network/input-stream-pump;1"].
|
||||
createInstance(Ci.nsIInputStreamPump);
|
||||
pump.init(stream, -1, -1, 0, 0, false);
|
||||
|
||||
// When we pass a null listener argument too asyncRead we expect it to throw
|
||||
// instead of crashing.
|
||||
try {
|
||||
pump.asyncRead(null, null);
|
||||
}
|
||||
catch (e) {
|
||||
return;
|
||||
}
|
||||
|
||||
do_throw("asyncRead didn't throw when passed a null listener argument.");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue