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

Side by Side Diff: LayoutTests/fast/filesystem/resources/file-entry-to-uri.js

Issue 22831019: Deprecate FileError in FileAPI (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win test expectation fix (temporary) Created 7 years, 4 months 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('fs-worker-common.js'); 2 importScripts('fs-worker-common.js');
3 importScripts('../../js/resources/js-test-pre.js'); 3 importScripts('../../js/resources/js-test-pre.js');
4 importScripts('fs-test-util.js'); 4 importScripts('fs-test-util.js');
5 } 5 }
6 6
7 description("Obtaining URL from FileEntry."); 7 description("Obtaining URL from FileEntry.");
8 8
9 var fileSystem = null; 9 var fileSystem = null;
10 var testFileName = 'testFileEntry.txt'; 10 var testFileName = 'testFileEntry.txt';
11 var testFileURI = null; 11 var testFileURI = null;
12 12
13 function errorCallback(error) { 13 function errorCallback(error) {
14 testFailed("Error occured:" + error.code); 14 testFailed("Error occured:" + error.name);
15 finishJSTest(); 15 finishJSTest();
16 } 16 }
17 17
18 function entryToURL(entry) { 18 function entryToURL(entry) {
19 testFileURL = entry.toURL(); 19 testFileURL = entry.toURL();
20 shouldBe("testFileURL", "'filesystem:file:///temporary/testFileEntry.txt'"); 20 shouldBe("testFileURL", "'filesystem:file:///temporary/testFileEntry.txt'");
21 finishJSTest(); 21 finishJSTest();
22 } 22 }
23 23
24 function createTestFile() { 24 function createTestFile() {
25 fileSystem.root.getFile(testFileName, {create:true}, entryToURL, errorCallba ck); 25 fileSystem.root.getFile(testFileName, {create:true}, entryToURL, errorCallba ck);
26 } 26 }
27 27
28 function fileSystemCallback(fs) { 28 function fileSystemCallback(fs) {
29 fileSystem = fs; 29 fileSystem = fs;
30 removeAllInDirectory(fileSystem.root, createTestFile, errorCallback); 30 removeAllInDirectory(fileSystem.root, createTestFile, errorCallback);
31 } 31 }
32 32
33 var jsTestIsAsync = true; 33 var jsTestIsAsync = true;
34 webkitRequestFileSystem(TEMPORARY, 100, fileSystemCallback, errorCallback); 34 webkitRequestFileSystem(TEMPORARY, 100, fileSystemCallback, errorCallback);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698