Index: chrome/content/tests/io.js |
=================================================================== |
--- a/chrome/content/tests/io.js |
+++ b/chrome/content/tests/io.js |
@@ -34,32 +34,32 @@ |
if (currentTest < tests.length) |
tests[currentTest](); |
else |
start(); |
} |
function write(file) |
{ |
- IO.writeToFile(file, true, function dataGenerator() |
+ IO.writeToFile(file, function dataGenerator() |
{ |
for (let i = 0; i < 10000; i++) |
yield "\u1234" + i + "\uffff\x00"; |
}(), function writeCallback(e) |
{ |
equal(e && e.toString(), null, "Write succeeded"); |
runNextTest(); |
}, null); |
} |
function read(file) |
{ |
let eofReceived = false; |
let i = 0; |
- IO.readFromFile(file, true, { |
+ IO.readFromFile(file, { |
process: function(line) |
{ |
if (eofReceived) |
ok(false, "No lines received after EOF"); |
if (line === null) |
{ |
eofReceived = true; |
@@ -78,17 +78,17 @@ |
equal(e && e.toString(), null, "Read succeeded"); |
ok(eofReceived, "File processor received EOF indicator before callback was called"); |
runNextTest(); |
}, null); |
} |
function failedRead(file) |
{ |
- IO.readFromFile(file, true, { |
+ IO.readFromFile(file, { |
process: function(line) |
{ |
ok(false, "Line received for non-existing file") |
} |
}, function readCallback(e) |
{ |
ok(e, "Error received reading non-existing file"); |
runNextTest(); |