summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/filesystem/resources/file-from-file-entry-sync.js
blob: e3ba7b637b4cb070827d065450de43611045a559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// FIXME: move this under workers/resources
importScripts('fs-worker-common.js');
importScripts('../../../resources/js-test.js');

description("Obtaining File from FileEntrySync.");

var fileSystem = webkitRequestFileSystemSync(this.TEMPORARY, 100);
removeAllInDirectorySync(fileSystem.root);

var testFileName = '/testFileEntry.txt';

var testFileEntry = fileSystem.root.getFile(testFileName, {create:true});
var testFile = testFileEntry.file();

shouldBe("testFile.name", "testFileEntry.name");
shouldBe("testFile.type", "'text/plain'");
shouldBe("testFile.size", "0");

removeAllInDirectorySync(fileSystem.root);
finishJSTest();