netwerk/test/unit/test_bug376865.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 function run_test() {
     2   var stream = Cc["@mozilla.org/io/string-input-stream;1"].
     3     createInstance(Ci.nsISupportsCString);
     4   stream.data = "foo bar baz";
     6   var pump = Cc["@mozilla.org/network/input-stream-pump;1"].
     7     createInstance(Ci.nsIInputStreamPump);
     8   pump.init(stream, -1, -1, 0, 0, false);
    10   // When we pass a null listener argument too asyncRead we expect it to throw
    11   // instead of crashing.
    12   try {
    13     pump.asyncRead(null, null);
    14   }
    15   catch (e) {
    16     return;
    17   }
    19   do_throw("asyncRead didn't throw when passed a null listener argument.");
    20 }

mercurial