Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Side by Side Diff: LayoutTests/fast/filesystem/resources/file-writer-sync-truncate-extend.js

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 if (this.importScripts) { 1 if (this.importScripts) {
2 importScripts('../resources/fs-worker-common.js'); 2 importScripts('../resources/fs-worker-common.js');
3 importScripts('../../js/resources/js-test-pre.js'); 3 importScripts('../../../resources/js-test.js');
4 importScripts('../resources/fs-test-util.js'); 4 importScripts('../resources/fs-test-util.js');
5 importScripts('../resources/file-writer-utils.js'); 5 importScripts('../resources/file-writer-utils.js');
6 } 6 }
7 7
8 description("Test using FileWriterSync.truncate to extend a file."); 8 description("Test using FileWriterSync.truncate to extend a file.");
9 9
10 // Start with an empty FileSystem. 10 // Start with an empty FileSystem.
11 var fileSystem = webkitRequestFileSystemSync(this.TEMPORARY, 100); 11 var fileSystem = webkitRequestFileSystemSync(this.TEMPORARY, 100);
12 removeAllInDirectorySync(fileSystem.root); 12 removeAllInDirectorySync(fileSystem.root);
13 13
(...skipping 17 matching lines...) Expand all
31 var reader = new FileReaderSync(); 31 var reader = new FileReaderSync();
32 var contents = reader.readAsBinaryString(file); 32 var contents = reader.readAsBinaryString(file);
33 var i; 33 var i;
34 for (i = 0; i < testData.length; ++i) 34 for (i = 0; i < testData.length; ++i)
35 assert(contents.charCodeAt(i) == testData.charCodeAt(i)); 35 assert(contents.charCodeAt(i) == testData.charCodeAt(i));
36 for (; i < writer.length; ++i) 36 for (; i < writer.length; ++i)
37 assert(!contents.charCodeAt(i)); 37 assert(!contents.charCodeAt(i));
38 38
39 testPassed("Truncate extension verified."); 39 testPassed("Truncate extension verified.");
40 finishJSTest(); 40 finishJSTest();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698