Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html b/third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dcf1a213973007e3a37361b406c0f493612c8364 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html |
| @@ -0,0 +1,43 @@ |
| +<html> |
| +<head> |
| +<script src="../../resources/js-test.js"></script> |
| +<script src="resources/fs-test-util.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| +description('This test tries calling various filesystem functions with null arguments.'); |
| + |
| +function errorCallback(error) |
| +{ |
| + 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.
|
| + finishJSTest(); |
| +} |
| + |
| +function successCallback(fs) |
| +{ |
| + window.fileSystem = fs; |
| + debug("Successfully obtained FileSystem:" + fileSystem.name); |
| + |
| + shouldThrow("fileSystem.root.moveTo(null)"); |
| + shouldThrow("fileSystem.root.copyTo(null)"); |
| + fileSystem.root.getFile("/test", { create: true }, function(entry) { |
| + 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.
|
| + entry.createWriter(function(writer) { |
| + window.writer = writer; |
| + shouldBeNull("writer.error"); |
| + shouldThrow("writer.write(null)"); |
| + shouldBeNull("writer.error"); |
| + finishJSTest(); |
| + }); |
| + }); |
| +} |
| + |
| +if (window.webkitRequestFileSystem) { |
| + webkitRequestFileSystem(window.TEMPORARY, 100, successCallback, errorCallback); |
| + window.jsTestIsAsync = true; |
| +} else { |
| + debug("This test requires FileSystem API support."); |
| +} |
| +</script> |
| +</body> |
| +</html> |