Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | var Cc = Components.classes; |
michael@0 | 2 | var Ci = Components.interfaces; |
michael@0 | 3 | |
michael@0 | 4 | function run_test() { |
michael@0 | 5 | var f = do_get_file('test_bug336501.js'); |
michael@0 | 6 | |
michael@0 | 7 | var fis = |
michael@0 | 8 | Cc["@mozilla.org/network/file-input-stream;1"]. |
michael@0 | 9 | createInstance(Ci.nsIFileInputStream); |
michael@0 | 10 | fis.init(f, -1, -1, 0); |
michael@0 | 11 | |
michael@0 | 12 | var bis = |
michael@0 | 13 | Cc["@mozilla.org/network/buffered-input-stream;1"]. |
michael@0 | 14 | createInstance(Ci.nsIBufferedInputStream); |
michael@0 | 15 | bis.init(fis, 32); |
michael@0 | 16 | |
michael@0 | 17 | var sis = |
michael@0 | 18 | Cc["@mozilla.org/scriptableinputstream;1"]. |
michael@0 | 19 | createInstance(Ci.nsIScriptableInputStream); |
michael@0 | 20 | sis.init(bis); |
michael@0 | 21 | |
michael@0 | 22 | sis.read(45); |
michael@0 | 23 | sis.close(); |
michael@0 | 24 | |
michael@0 | 25 | var data = sis.read(45); |
michael@0 | 26 | do_check_eq(data.length, 0); |
michael@0 | 27 | } |