Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/tests/io.js

Issue 5349448087502848: Issue 192 - Clean up from #153 (Closed)
Patch Set: Created April 14, 2014, 6:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld