OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 <script src="resources/fs-test-util.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <script> |
| 8 description('This test tries calling various filesystem functions with null argu
ments.'); |
| 9 |
| 10 function errorCallback(error) |
| 11 { |
| 12 debug("Error occured: " + error.name); |
| 13 finishJSTest(); |
| 14 } |
| 15 |
| 16 function successCallback(fs) |
| 17 { |
| 18 window.fileSystem = fs; |
| 19 debug("Successfully obtained FileSystem: " + fileSystem.name); |
| 20 |
| 21 fileSystem.root.getFile("/test", { create: true }, function(entry) { |
| 22 entry.createWriter(function(writer) { |
| 23 window.writer = writer; |
| 24 shouldBeNull("writer.error"); |
| 25 shouldThrow("writer.write(null)"); |
| 26 shouldBeNull("writer.error"); |
| 27 finishJSTest(); |
| 28 }); |
| 29 }); |
| 30 } |
| 31 |
| 32 if (window.webkitRequestFileSystem) { |
| 33 webkitRequestFileSystem(window.TEMPORARY, 100, successCallback, errorCallbac
k); |
| 34 window.jsTestIsAsync = true; |
| 35 } else { |
| 36 debug("This test requires FileSystem API support."); |
| 37 } |
| 38 </script> |
| 39 </body> |
| 40 </html> |
OLD | NEW |