OLD | NEW |
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('../../js/resources/js-test-pre.js'); |
4 importScripts('../resources/fs-test-util.js'); | 4 importScripts('../resources/fs-test-util.js'); |
5 } | 5 } |
6 | 6 |
7 description("requestFileSystem PERSISTENT test."); | 7 description("requestFileSystem PERSISTENT test."); |
8 | 8 |
9 var fileSystem = null; | 9 var fileSystem = null; |
10 | 10 |
11 function errorCallback(error) { | 11 function errorCallback(error) { |
12 debug("Error occured while requesting a PERSISTENT file system:" + error.cod
e); | 12 debug("Error occured while requesting a PERSISTENT file system:" + error.nam
e); |
13 finishJSTest(); | 13 finishJSTest(); |
14 } | 14 } |
15 | 15 |
16 function successCallback(fs) { | 16 function successCallback(fs) { |
17 fileSystem = fs; | 17 fileSystem = fs; |
18 debug("Successfully obtained PERSISTENT FileSystem:" + fileSystem.name); | 18 debug("Successfully obtained PERSISTENT FileSystem:" + fileSystem.name); |
19 shouldBeTrue("fileSystem.name.length > 0"); | 19 shouldBeTrue("fileSystem.name.length > 0"); |
20 shouldBe("fileSystem.root.fullPath", '"/"'); | 20 shouldBe("fileSystem.root.fullPath", '"/"'); |
21 finishJSTest(); | 21 finishJSTest(); |
22 } | 22 } |
23 | 23 |
24 var jsTestIsAsync = true; | 24 var jsTestIsAsync = true; |
25 webkitRequestFileSystem(PERSISTENT, 100, successCallback, errorCallback); | 25 webkitRequestFileSystem(PERSISTENT, 100, successCallback, errorCallback); |
OLD | NEW |