Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / filesystem / not-enough-arguments.html
blobda3d4694fa6e4228749e5a3e20566b961274d5c6
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 too few arguments.');
10 function errorCallback(error)
12 debug("Error occured:" + error.name);
13 finishJSTest();
16 function successCallback(fs)
18 fileSystem = fs;
19 debug("Successfully obtained Persistent FileSystem:" + fileSystem.name);
21 shouldThrow("fileSystem.root.removeRecursively()");
22 shouldThrow("fileSystem.root.moveTo()");
23 shouldThrow("fileSystem.root.copyTo()");
24 reader = fileSystem.root.createReader();
25 shouldThrow("reader.readEntries()");
27 reader.readEntries(function(entries) {
28 window.entries = entries;
30 fileSystem.root.getFile("/test", { create: true }, function(entry) {
31 window.entry = entry;
32 shouldThrow("entry.createWriter()");
33 shouldThrow("entry.file()");
35 entry.createWriter(function(writer) {
36 window.writer = writer;
38 shouldThrow("writer.write()");
39 shouldThrow("writer.seek()");
40 shouldThrow("writer.truncate()");
42 finishJSTest();
43 });
44 });
45 });
48 if (window.webkitRequestFileSystem) {
49 shouldThrow("webkitResolveLocalFileSystemURL()");
50 shouldThrow("webkitRequestFileSystem()");
51 shouldThrow("webkitRequestFileSystem(PERSISTENT)");
52 shouldThrow("webkitRequestFileSystem(PERSISTENT, 100)");
53 webkitRequestFileSystem(window.TEMPORARY, 100, successCallback, errorCallback);
54 window.jsTestIsAsync = true;
55 } else
56 debug("This test requires FileSystem API support.");
57 </script>
58 </body>
59 </html>