| OLD | NEW |
| 1 if (this.importScripts) { | 1 if (this.importScripts) { |
| 2 importScripts('fs-worker-common.js'); | 2 importScripts('fs-worker-common.js'); |
| 3 importScripts('../../js/resources/js-test-pre.js'); | 3 importScripts('../../../resources/js-test.js'); |
| 4 importScripts('file-writer-utils.js'); | 4 importScripts('file-writer-utils.js'); |
| 5 } | 5 } |
| 6 | 6 |
| 7 description("Test of extending a file using truncate()."); | 7 description("Test of extending a file using truncate()."); |
| 8 | 8 |
| 9 function onTestSucceeded() | 9 function onTestSucceeded() |
| 10 { | 10 { |
| 11 testPassed("Truncate extension verified."); | 11 testPassed("Truncate extension verified."); |
| 12 cleanUp(); | 12 cleanUp(); |
| 13 } | 13 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 30 function runTest(fileEntry, fileWriter) { | 30 function runTest(fileEntry, fileWriter) { |
| 31 var contents = "Lorem ipsum"; | 31 var contents = "Lorem ipsum"; |
| 32 writeString(fileEntry, fileWriter, 0, contents, | 32 writeString(fileEntry, fileWriter, 0, contents, |
| 33 function() { | 33 function() { |
| 34 truncateToExtend(fileEntry, fileWriter, contents, onTestSucc
eeded); | 34 truncateToExtend(fileEntry, fileWriter, contents, onTestSucc
eeded); |
| 35 }); | 35 }); |
| 36 } | 36 } |
| 37 | 37 |
| 38 var jsTestIsAsync = true; | 38 var jsTestIsAsync = true; |
| 39 setupAndRunTest(1024, 'file-writer-truncate-extend', runTest); | 39 setupAndRunTest(1024, 'file-writer-truncate-extend', runTest); |
| OLD | NEW |