function writeTest(entry, expectSuccess) {
  var verifyFileContent = function() {
    var expectedContent = kInitialTestFileContent;
    if (expectSuccess)
      expectedContent = expectedContent.concat(kTextToWrite);

    readAndExpectContent(entry, true, expectedContent, chrome.test.succeed);
  };

  write(entry, kTextToWrite, expectSuccess, verifyFileContent);
}
/**
 * Runs write test.
 * Attempts to write to the entry. If the write operation ends as expected, the
 * test verifies new content of the file.
 *
 * @param {FileEntry} entry Entry to be written.
 * @param {boolean} expectSuccess Whether the test should succeed.
 */
Runs write test.
Attempts to write to the entry. If the write operation ends as expected, the
test verifies new content of the file.

@param {FileEntry} entry Entry to be written.
@param {boolean} expectSuccess Whether the test should succeed.
Runs write test . Attempts to write to the entry . If the write operation ends as expected the test verifies new content of the file . @param { FileEntry } entry Entry to be written . @param { boolean } expectSuccess Whether the test should succeed .
function writeTest(entry, expectSuccess) {
  var verifyFileContent = function() {
    var expectedContent = kInitialTestFileContent;
    if (expectSuccess)
      expectedContent = expectedContent.concat(kTextToWrite);
    readAndExpectContent(entry, true, expectedContent, chrome.test.succeed);
  };
  write(entry, kTextToWrite, expectSuccess, verifyFileContent);
}
function writeTest ( entry , expectSuccess ) { var verifyFileContent = function ( ) { var expectedContent = kInitialTestFileContent ; if ( expectSuccess ) expectedContent = expectedContent . concat ( kTextToWrite ) ; readAndExpectContent ( entry , true , expectedContent , chrome . test . succeed ) ; } ; write ( entry , kTextToWrite , expectSuccess , verifyFileContent ) ; }
Runs write test.
Runs write test .