Chromium Code Reviews| 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); | |
|
philipj_slow
2015/12/01 09:00:24
space after comma makes output nicer
jsbell
2015/12/01 19:50:32
Done.
| |
| 13 finishJSTest(); | |
| 14 } | |
| 15 | |
| 16 function successCallback(fs) | |
| 17 { | |
| 18 window.fileSystem = fs; | |
| 19 debug("Successfully obtained FileSystem:" + fileSystem.name); | |
| 20 | |
| 21 shouldThrow("fileSystem.root.moveTo(null)"); | |
| 22 shouldThrow("fileSystem.root.copyTo(null)"); | |
| 23 fileSystem.root.getFile("/test", { create: true }, function(entry) { | |
| 24 window.entry = entry; | |
|
philipj_slow
2015/12/01 09:00:24
entry isn't used in any later should*() so I don't
jsbell
2015/12/01 19:50:32
Done.
| |
| 25 entry.createWriter(function(writer) { | |
| 26 window.writer = writer; | |
| 27 shouldBeNull("writer.error"); | |
| 28 shouldThrow("writer.write(null)"); | |
| 29 shouldBeNull("writer.error"); | |
| 30 finishJSTest(); | |
| 31 }); | |
| 32 }); | |
| 33 } | |
| 34 | |
| 35 if (window.webkitRequestFileSystem) { | |
| 36 webkitRequestFileSystem(window.TEMPORARY, 100, successCallback, errorCallbac k); | |
| 37 window.jsTestIsAsync = true; | |
| 38 } else { | |
| 39 debug("This test requires FileSystem API support."); | |
| 40 } | |
| 41 </script> | |
| 42 </body> | |
| 43 </html> | |
| OLD | NEW |