[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kinuko at chromium.org kinuko at chromium.org
Wed Dec 22 14:24:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cc1a625178a6c15d14f77242eec178c23755b312
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 21:10:07 2010 +0000

    2010-10-07  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by David Levin.
    
            Add layout tests for FileSystem API
            https://bugs.webkit.org/show_bug.cgi?id=44920
    
            Added tests for major Entry operations: copyTo, moveTo, getFile,
            getDirectory, remove, createReader.readEntries, getParent.
    
            * fast/filesystem/op-copy-expected.txt: Added.
            * fast/filesystem/op-copy.html: Added.
            * fast/filesystem/op-get-entry-expected.txt: Added.
            * fast/filesystem/op-get-entry.html: Added.
            * fast/filesystem/op-get-parent-expected.txt: Added.
            * fast/filesystem/op-get-parent.html: Added.
            * fast/filesystem/op-move-expected.txt: Added.
            * fast/filesystem/op-move.html: Added.
            * fast/filesystem/op-read-directory-expected.txt: Added.
            * fast/filesystem/op-read-directory.html: Added.
            * fast/filesystem/op-remove-expected.txt: Added.
            * fast/filesystem/op-remove.html: Added.
            * fast/filesystem/op-restricted-chars-expected.txt: Added.
            * fast/filesystem/op-restricted-chars.html: Added.
            * fast/filesystem/op-restricted-names-expected.txt: Added.
            * fast/filesystem/op-restricted-names.html: Added.
            * fast/filesystem/resources/fs-test-util.js:
            * fast/filesystem/resources/op-copy.js: Added.
            * fast/filesystem/resources/op-get-entry.js: Added.
            * fast/filesystem/resources/op-get-parent.js: Added.
            * fast/filesystem/resources/op-move.js: Added.
            * fast/filesystem/resources/op-read-directory.js: Added.
            * fast/filesystem/resources/op-remove.js: Added.
            * fast/filesystem/resources/op-restricted-chars.js: Added.
            * fast/filesystem/resources/op-restricted-names.js: Added.
            * fast/filesystem/resources/op-tests-helper.js: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69339 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 77b26c2..3206249 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,40 @@
+2010-10-07  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by David Levin.
+
+        Add layout tests for FileSystem API
+        https://bugs.webkit.org/show_bug.cgi?id=44920
+
+        Added tests for major Entry operations: copyTo, moveTo, getFile,
+        getDirectory, remove, createReader.readEntries, getParent.
+
+        * fast/filesystem/op-copy-expected.txt: Added.
+        * fast/filesystem/op-copy.html: Added.
+        * fast/filesystem/op-get-entry-expected.txt: Added.
+        * fast/filesystem/op-get-entry.html: Added.
+        * fast/filesystem/op-get-parent-expected.txt: Added.
+        * fast/filesystem/op-get-parent.html: Added.
+        * fast/filesystem/op-move-expected.txt: Added.
+        * fast/filesystem/op-move.html: Added.
+        * fast/filesystem/op-read-directory-expected.txt: Added.
+        * fast/filesystem/op-read-directory.html: Added.
+        * fast/filesystem/op-remove-expected.txt: Added.
+        * fast/filesystem/op-remove.html: Added.
+        * fast/filesystem/op-restricted-chars-expected.txt: Added.
+        * fast/filesystem/op-restricted-chars.html: Added.
+        * fast/filesystem/op-restricted-names-expected.txt: Added.
+        * fast/filesystem/op-restricted-names.html: Added.
+        * fast/filesystem/resources/fs-test-util.js:
+        * fast/filesystem/resources/op-copy.js: Added.
+        * fast/filesystem/resources/op-get-entry.js: Added.
+        * fast/filesystem/resources/op-get-parent.js: Added.
+        * fast/filesystem/resources/op-move.js: Added.
+        * fast/filesystem/resources/op-read-directory.js: Added.
+        * fast/filesystem/resources/op-remove.js: Added.
+        * fast/filesystem/resources/op-restricted-chars.js: Added.
+        * fast/filesystem/resources/op-restricted-names.js: Added.
+        * fast/filesystem/resources/op-tests-helper.js: Added.
+
 2010-10-07  Albert J. Wong  <ajwong at chromium.org>
 
         [Chromium] Unreviewed. Build fix. New baseline.
diff --git a/LayoutTests/fast/filesystem/op-copy-expected.txt b/LayoutTests/fast/filesystem/op-copy-expected.txt
new file mode 100644
index 0000000..a76a921
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-copy-expected.txt
@@ -0,0 +1,59 @@
+* Running: CopyFileSimple
+PASS Succeeded: "/a/b".copyTo("/a", "c")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+PASS Verified entry: ENTRY {path:/a/c name:c type:FILE}
+* Running: CopyDirectorySimple
+PASS Succeeded: "/a/b".copyTo("/a", "c")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/c name:c type:DIRECTORY}
+* Running: CopyFileToDifferentDirectory
+PASS Succeeded: "/a/b".copyTo("/c", "d")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+PASS Verified entry: ENTRY {path:/c/d name:d type:FILE}
+* Running: CopyFileWithEmptyName
+PASS Succeeded: "/a/b".copyTo("/c", "null")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+PASS Verified entry: ENTRY {path:/c/b name:b type:FILE}
+* Running: CopyFileWithEmptyNameToSameDirectory
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: CopyFileWithSameName
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: CopyForNonExistentEntry
+PASS Succeeded: "/a/b".remove()
+PASS this.expectedErrorCode + "" is "8"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/c name:c type:DIRECTORY}
+* Running: CopyEntryToNonExistentDirectory
+PASS Succeeded: "/c".remove()
+PASS this.expectedErrorCode + "" is "8"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: CopyEntryToItsChild
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b/c name:c type:DIRECTORY}
+* Running: CopyRecursive
+PASS Succeeded: "/a".copyTo("/b", "a")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b/c name:c type:FILE}
+PASS Verified entry: ENTRY {path:/a/b/d name:d type:FILE}
+PASS Verified entry: ENTRY {path:/b/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b/a/b/c name:c type:FILE}
+PASS Verified entry: ENTRY {path:/b/a/b/d name:d type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-copy.html b/LayoutTests/fast/filesystem/op-copy.html
new file mode 100644
index 0000000..838470d
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-copy.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-copy.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/op-get-entry-expected.txt b/LayoutTests/fast/filesystem/op-get-entry-expected.txt
new file mode 100644
index 0000000..91d564e
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-get-entry-expected.txt
@@ -0,0 +1,60 @@
+* Running: CreateSimple
+PASS Succeeded: "/".getDirectory("a")
+PASS Succeeded: "/".getFile("b")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b name:b type:FILE}
+* Running: CreateNested
+PASS Succeeded: "/".getDirectory("a")
+PASS Succeeded: "/a".getDirectory("b")
+PASS Succeeded: "/a/b".getDirectory("c")
+PASS Succeeded: "/a/b/c".getDirectory("d")
+PASS Succeeded: "/a/b/c/d".getFile("e")
+PASS Verified entry: ENTRY {path:/a/b/c/d/e name:e type:FILE}
+* Running: CreateNestedWithAbsolutePath
+PASS Succeeded: "/dummy".getDirectory("/a")
+PASS Succeeded: "/dummy".getDirectory("/a/b")
+PASS Succeeded: "/dummy".getDirectory("/a/b/c")
+PASS Succeeded: "/dummy".getDirectory("/a/b/c/d")
+PASS Succeeded: "/dummy".getFile("/a/b/c/d/e")
+PASS Verified entry: ENTRY {path:/dummy name:dummy type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b/c/d/e name:e type:FILE}
+* Running: CreateNestedWithRelativePath
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+* Running: GetExistingEntry
+PASS Succeeded: "/".getDirectory("a")
+PASS Succeeded: "/".getFile("b")
+PASS Succeeded: "/".getDirectory("a")
+PASS this.environment[this.entry.fullPath].fullPath is "/a"
+PASS this.environment[this.entry.fullPath].isFile + "" is "false"
+PASS this.environment[this.entry.fullPath].isDirectory + "" is "true"
+PASS Succeeded: "/".getFile("b")
+PASS this.environment[this.entry.fullPath].fullPath is "/b"
+PASS this.environment[this.entry.fullPath].isFile + "" is "true"
+PASS this.environment[this.entry.fullPath].isDirectory + "" is "false"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b name:b type:FILE}
+* Running: GetNonExistent
+PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "8"
+* Running: GetFileForDirectory
+PASS this.expectedErrorCode + "" is "11"
+PASS this.expectedErrorCode + "" is "11"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+* Running: GetDirectoryForFile
+PASS this.expectedErrorCode + "" is "11"
+PASS this.expectedErrorCode + "" is "11"
+PASS Verified entry: ENTRY {path:/a name:a type:FILE}
+* Running: CreateWithExclusive
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b name:b type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-get-entry.html b/LayoutTests/fast/filesystem/op-get-entry.html
new file mode 100644
index 0000000..3dfc638
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-get-entry.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-get-entry.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/op-get-parent-expected.txt b/LayoutTests/fast/filesystem/op-get-parent-expected.txt
new file mode 100644
index 0000000..ff9c129
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-get-parent-expected.txt
@@ -0,0 +1,17 @@
+* Running: GetParent
+PASS Succeeded: "/".getParent()
+Parent entry: ENTRY {path:/ name: type:DIRECTORY}
+PASS Succeeded: "/a".getParent()
+Parent entry: ENTRY {path:/ name: type:DIRECTORY}
+PASS Succeeded: "/a/b".getParent()
+Parent entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Succeeded: "/a/b/c".getParent()
+Parent entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b/c name:c type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-get-parent.html b/LayoutTests/fast/filesystem/op-get-parent.html
new file mode 100644
index 0000000..55ee607
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-get-parent.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-get-parent.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
+
+
diff --git a/LayoutTests/fast/filesystem/op-move-expected.txt b/LayoutTests/fast/filesystem/op-move-expected.txt
new file mode 100644
index 0000000..4158672
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-move-expected.txt
@@ -0,0 +1,56 @@
+* Running: MoveFileSimple
+PASS Succeeded: "/a/b".moveTo("/a", "c")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry does NOT exist: /a/b
+PASS Verified entry: ENTRY {path:/a/c name:c type:FILE}
+* Running: MoveDirectorySimple
+PASS Succeeded: "/a/b".moveTo("/a", "c")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry does NOT exist: /a/b
+PASS Verified entry: ENTRY {path:/a/c name:c type:DIRECTORY}
+* Running: MoveFileToDifferentDirectory
+PASS Succeeded: "/a/b".moveTo("/c", "d")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry does NOT exist: /a/b
+PASS Verified entry: ENTRY {path:/c/d name:d type:FILE}
+* Running: MoveFileWithEmptyName
+PASS Succeeded: "/a/b".moveTo("/c", "null")
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry does NOT exist: /a/b
+PASS Verified entry: ENTRY {path:/c/b name:b type:FILE}
+* Running: MoveFileWithEmptyNameToSameDirectory
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: MoveFileWithSameName
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: MoveForNonExistentEntry
+PASS Succeeded: "/a/b".remove()
+PASS this.expectedErrorCode + "" is "8"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/c name:c type:DIRECTORY}
+* Running: MoveEntryToNonExistentDirectory
+PASS Succeeded: "/c".remove()
+PASS this.expectedErrorCode + "" is "8"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
+* Running: MoveEntryToItsChild
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b/c name:c type:DIRECTORY}
+* Running: MoveRecursive
+PASS Succeeded: "/a".moveTo("/b", "a")
+PASS Verified entry does NOT exist: /a
+PASS Verified entry: ENTRY {path:/b/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/b/a/b/c name:c type:FILE}
+PASS Verified entry: ENTRY {path:/b/a/b/d name:d type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-move.html b/LayoutTests/fast/filesystem/op-move.html
new file mode 100644
index 0000000..f9f122c
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-move.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-move.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/op-read-directory-expected.txt b/LayoutTests/fast/filesystem/op-read-directory-expected.txt
new file mode 100644
index 0000000..f1f043c
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-read-directory-expected.txt
@@ -0,0 +1,22 @@
+* Running: ReadDirectory
+PASS Succeeded: "/".createReader().readEntries()
+Entries: [ENTRY {path:/a name:a type:DIRECTORY},
+ ENTRY {path:/b name:b type:DIRECTORY},
+ ENTRY {path:/c name:c type:FILE},
+ ENTRY {path:/d name:d type:FILE},
+ ENTRY {path:/e name:e type:DIRECTORY},
+ ENTRY {path:/f name:f type:FILE},
+ ENTRY {path:/g name:g type:DIRECTORY}]
+PASS Succeeded: "/c".remove()
+PASS Succeeded: "/e".remove()
+PASS Succeeded: "/f".remove()
+PASS Succeeded: "/".createReader().readEntries()
+Entries: [ENTRY {path:/a name:a type:DIRECTORY},
+ ENTRY {path:/b name:b type:DIRECTORY},
+ ENTRY {path:/d name:d type:FILE},
+ ENTRY {path:/g name:g type:DIRECTORY}]
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-read-directory.html b/LayoutTests/fast/filesystem/op-read-directory.html
new file mode 100644
index 0000000..31acba0
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-read-directory.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-read-directory.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/op-remove-expected.txt b/LayoutTests/fast/filesystem/op-remove-expected.txt
new file mode 100644
index 0000000..d362e2e
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-remove-expected.txt
@@ -0,0 +1,15 @@
+* Running: RemoveSimple
+PASS Succeeded: "/a".remove()
+PASS Succeeded: "/b".remove()
+PASS Verified entry does NOT exist: /a
+PASS Verified entry does NOT exist: /b
+* Running: RemoveNonRecursiveWithChildren
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
+PASS Verified entry: ENTRY {path:/a/c name:c type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-remove.html b/LayoutTests/fast/filesystem/op-remove.html
new file mode 100644
index 0000000..e6ffbb7
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-remove.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-remove.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt b/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt
new file mode 100644
index 0000000..ade72df
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt
@@ -0,0 +1,38 @@
+* Running: RestrictedChars
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Succeeded: "/".getFile("ab")
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/ab name:ab type:FILE}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-restricted-chars.html b/LayoutTests/fast/filesystem/op-restricted-chars.html
new file mode 100644
index 0000000..330c6b5
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-restricted-chars.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-restricted-chars.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/op-restricted-names-expected.txt b/LayoutTests/fast/filesystem/op-restricted-names-expected.txt
new file mode 100644
index 0000000..c390379
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-restricted-names-expected.txt
@@ -0,0 +1,46 @@
+* Running: RestrictedChars
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "13"
+PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
+Finished running tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/op-restricted-names.html b/LayoutTests/fast/filesystem/op-restricted-names.html
new file mode 100644
index 0000000..4aabfc6
--- /dev/null
+++ b/LayoutTests/fast/filesystem/op-restricted-names.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/fs-test-util.js"></script>
+</head>
+<body>
+<div id="console"></div>
+<script src="resources/op-restricted-names.js"></script>
+<script src="resources/op-tests-helper.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/resources/op-copy.js b/LayoutTests/fast/filesystem/resources/op-copy.js
new file mode 100644
index 0000000..3bf2a95
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-copy.js
@@ -0,0 +1,164 @@
+var testCases = [
+    {
+        name: 'CopyFileSimple',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'}
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/a', 'c'); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/a/c'}
+        ],
+    },
+    {
+        name: 'CopyDirectorySimple',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/a', 'c'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/c', isDirectory:true}
+        ],
+    },
+    {
+        name: 'CopyFileToDifferentDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/c', 'd'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c/d'}
+        ],
+    },
+    {
+        name: 'CopyFileWithEmptyName',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/c', null); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c/b'}
+        ],
+    },
+    {
+        name: 'CopyFileWithEmptyNameToSameDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/a', null, FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'CopyFileWithSameName',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+        tests: [
+            function(helper) { helper.copy('/a/b', '/a', 'b', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'CopyForNonExistentEntry',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.remove('/a/b'); },
+            function(helper) { helper.copy('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/c', isDirectory:true},
+        ],
+    },
+    {
+        name: 'CopyEntryToNonExistentDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.remove('/c'); },
+            function(helper) { helper.copy('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'CopyEntryToItsChild',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.copy('/a', '/a/b', 'd', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/a/b', '/a/b/c', 'd', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c', isDirectory:true},
+        ],
+    },
+    {
+        name: 'CopyRecursive',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c'},
+            {fullPath:'/a/b/d'},
+            {fullPath:'/b', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.copy('/a', '/b', 'a'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c'},
+            {fullPath:'/a/b/d'},
+            {fullPath:'/b/a', isDirectory:true},
+            {fullPath:'/b/a/b', isDirectory:true},
+            {fullPath:'/b/a/b/c'},
+            {fullPath:'/b/a/b/d'},
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-get-entry.js b/LayoutTests/fast/filesystem/resources/op-get-entry.js
new file mode 100644
index 0000000..5551a37
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-get-entry.js
@@ -0,0 +1,124 @@
+var testCases = [
+    {
+        name: 'CreateSimple',
+        precondition: [ ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {create:true}); },
+            function(helper) { helper.getFile('/', 'b', {create:true}); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b'},
+        ],
+    },
+    {
+        name: 'CreateNested',
+        precondition: [ ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {create:true}); },
+            function(helper) { helper.getDirectory('/a', 'b', {create:true}); },
+            function(helper) { helper.getDirectory('/a/b', 'c', {create:true}); },
+            function(helper) { helper.getDirectory('/a/b/c', 'd', {create:true}); },
+            function(helper) { helper.getFile('/a/b/c/d', 'e', {create:true}); },
+        ],
+        postcondition: [
+            {fullPath:'/a/b/c/d/e'},
+        ],
+    },
+    {
+        name: 'CreateNestedWithAbsolutePath',
+        precondition: [
+            {fullPath:'/dummy', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.getDirectory('/dummy', '/a', {create:true}); },
+            function(helper) { helper.getDirectory('/dummy', '/a/b', {create:true}); },
+            function(helper) { helper.getDirectory('/dummy', '/a/b/c', {create:true}); },
+            function(helper) { helper.getDirectory('/dummy', '/a/b/c/d', {create:true}); },
+            function(helper) { helper.getFile('/dummy', '/a/b/c/d/e', {create:true}); }
+        ],
+        postcondition: [
+            {fullPath:'/dummy', isDirectory:true},
+            {fullPath:'/a/b/c/d/e'},
+        ],
+    },
+    {
+        name: 'CreateNestedWithRelativePath',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+        ],
+        tests: [
+            // FIXME: For now they throw an error because they fail the check for restricted-names: 'a path component should not end with period'.
+            function(helper) { helper.getDirectory('/a', './b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getDirectory('/a', '../b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getDirectory('/a', '/a/../../b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [ ],
+    },
+    {
+        name: 'GetExistingEntry',
+        precondition: [ ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {create:true}); },
+            function(helper) { helper.getFile('/', 'b', {create:true}); },
+            function(helper) { helper.getDirectory('/', 'a'); },
+            function(helper) { helper.getFile('/', 'b'); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b'},
+        ],
+    },
+    {
+        name: 'GetNonExistent',
+        precondition: [ ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {}, FileError.NOT_FOUND_ERR); },
+            function(helper) { helper.getFile('/', 'b', {}, FileError.NOT_FOUND_ERR); },
+            function(helper) { helper.getDirectory('/', '/nonexistent/a', {create:true}, FileError.NOT_FOUND_ERR); },
+            function(helper) { helper.getFile('/', '/nonexistent/b', {create:true}, FileError.NOT_FOUND_ERR); }
+        ],
+        postcondition: [ ],
+    },
+    {
+        name: 'GetFileForDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.getFile('/', 'a', {}, FileError.INVALID_STATE_ERR); },
+            function(helper) { helper.getFile('/', '/a', {}, FileError.INVALID_STATE_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true}
+        ],
+    },
+    {
+        name: 'GetDirectoryForFile',
+        precondition: [
+            {fullPath:'/a'}
+        ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {}, FileError.INVALID_STATE_ERR); },
+            function(helper) { helper.getDirectory('/', '/a', {}, FileError.INVALID_STATE_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a'}
+        ],
+    },
+    {
+        name: 'CreateWithExclusive',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b'}
+        ],
+        tests: [
+            function(helper) { helper.getDirectory('/', 'a', {create:true, exclusive:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'b', {create:true, exclusive:true}, FileError.INVALID_MODIFICATION_ERR); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b'}
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-get-parent.js b/LayoutTests/fast/filesystem/resources/op-get-parent.js
new file mode 100644
index 0000000..bde953c
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-get-parent.js
@@ -0,0 +1,21 @@
+var testCases = [
+    {
+        name: 'GetParent',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c'},
+        ],
+        tests: [
+            function(helper) { helper.getParent('/'); },
+            function(helper) { helper.getParent('/a'); },
+            function(helper) { helper.getParent('/a/b'); },
+            function(helper) { helper.getParent('/a/b/c'); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c'},
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-move.js b/LayoutTests/fast/filesystem/resources/op-move.js
new file mode 100644
index 0000000..3e4fa23
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-move.js
@@ -0,0 +1,161 @@
+var testCases = [
+    {
+        name: 'MoveFileSimple',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'}
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/a', 'c'); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', nonexistent:true},
+            {fullPath:'/a/c'}
+        ],
+    },
+    {
+        name: 'MoveDirectorySimple',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/a', 'c'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', nonexistent:true},
+            {fullPath:'/a/c', isDirectory:true}
+        ],
+    },
+    {
+        name: 'MoveFileToDifferentDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/c', 'd'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', nonexistent:true},
+            {fullPath:'/c/d'}
+        ],
+    },
+    {
+        name: 'MoveFileWithEmptyName',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/c', null); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', nonexistent:true},
+            {fullPath:'/c/b'}
+        ],
+    },
+    {
+        name: 'MoveFileWithEmptyNameToSameDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/a', null, FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'MoveFileWithSameName',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+        tests: [
+            function(helper) { helper.move('/a/b', '/a', 'b', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'MoveForNonExistentEntry',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.remove('/a/b'); },
+            function(helper) { helper.move('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/c', isDirectory:true},
+        ],
+    },
+    {
+        name: 'MoveEntryToNonExistentDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.remove('/c'); },
+            function(helper) { helper.move('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b'},
+        ],
+    },
+    {
+        name: 'MoveEntryToItsChild',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.move('/a', '/a/b', 'd', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.move('/a/b', '/a/b/c', 'd', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c', isDirectory:true},
+        ],
+    },
+    {
+        name: 'MoveRecursive',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/b/c'},
+            {fullPath:'/a/b/d'},
+            {fullPath:'/b', isDirectory:true},
+        ],
+        tests: [
+            function(helper) { helper.move('/a', '/b', 'a'); },
+        ],
+        postcondition: [
+            {fullPath:'/a', nonexistent:true},
+            {fullPath:'/b/a', isDirectory:true},
+            {fullPath:'/b/a/b', isDirectory:true},
+            {fullPath:'/b/a/b/c'},
+            {fullPath:'/b/a/b/d'},
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-read-directory.js b/LayoutTests/fast/filesystem/resources/op-read-directory.js
new file mode 100644
index 0000000..bef2a48
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-read-directory.js
@@ -0,0 +1,23 @@
+var testCases = [
+    {
+        name: 'ReadDirectory',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b', isDirectory:true},
+            {fullPath:'/c', },
+            {fullPath:'/d', },
+            {fullPath:'/e', isDirectory:true},
+            {fullPath:'/f', },
+            {fullPath:'/g', isDirectory:true},
+            {fullPath:'/a/b'},
+            {fullPath:'/a/c'},
+        ],
+        tests: [
+            function(helper) { helper.readDirectory('/'); },
+            function(helper) { helper.remove('/c'); },
+            function(helper) { helper.remove('/e'); },
+            function(helper) { helper.remove('/f'); },
+            function(helper) { helper.readDirectory('/'); }
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-remove.js b/LayoutTests/fast/filesystem/resources/op-remove.js
new file mode 100644
index 0000000..119ac82
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-remove.js
@@ -0,0 +1,34 @@
+var testCases = [
+    {
+        name: 'RemoveSimple',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/b'}
+        ],
+        tests: [
+            function(helper) { helper.remove('/a'); },
+            function(helper) { helper.remove('/b'); }
+        ],
+        postcondition: [
+            {fullPath:'/a', nonexistent:true},
+            {fullPath:'/b', nonexistent:true}
+        ],
+    },
+    {
+        name: 'RemoveNonRecursiveWithChildren',
+        precondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/c',}
+        ],
+        tests: [
+            function(helper) { helper.remove('/a', FileError.INVALID_MODIFICATION_ERR); }
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true},
+            {fullPath:'/a/b', isDirectory:true},
+            {fullPath:'/a/c',}
+        ],
+    },
+];
+
diff --git a/LayoutTests/fast/filesystem/resources/op-restricted-chars.js b/LayoutTests/fast/filesystem/resources/op-restricted-chars.js
new file mode 100644
index 0000000..aa9095e
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-restricted-chars.js
@@ -0,0 +1,51 @@
+var testCases = [
+    {
+        name: 'RestrictedChars',
+        precondition: [ ],
+        tests: [
+            // Restricted character in 'path' parameter.
+            function(helper) { helper.getFile('/', 'a\\b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a<b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a>b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a:b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a?b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a*b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a"b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a|b', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', '\\ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', '<ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', ':ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', '?ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', '*ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', '"ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', '|ab', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'ab\\', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab<', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab:', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab?', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab*', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab"', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'ab|', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            // This should succeed.
+            function(helper) { helper.getFile('/', 'ab', {create:true}); },
+
+            // Restricted character in 'name' parameters.
+            function(helper) { helper.copy('/ab', '/', 'a\\b',FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a<b', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a:b', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a?b', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a*b', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a"b', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/ab', '/', 'a|b', FileError.INVALID_MODIFICATION_ERR); },
+
+            // 'Name' parameter cannot contain '/'.
+            function(helper) { helper.copy('/ab', '/', 'a/b', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/ab'},
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-restricted-names.js b/LayoutTests/fast/filesystem/resources/op-restricted-names.js
new file mode 100644
index 0000000..e17a1a1
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-restricted-names.js
@@ -0,0 +1,59 @@
+var testCases = [
+    {
+        name: 'RestrictedChars',
+        precondition: [
+            {fullPath:'/a', isDirectory:true}
+        ],
+        tests: [
+            function(helper) { helper.getFile('/', 'con', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'CON', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Con', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'cOn.txt', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a/coN', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'prn', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'PRN', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Prn', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'pRn.txt', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a/prN', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'aux', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'AUX', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Aux', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'aUx.txt', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a/auX', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'nul', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'NUL', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Nul', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'nUl.txt', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'a/nuL', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'com1', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'COM2', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Com4', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'cOM7.foo', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'b/coM9', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            function(helper) { helper.getFile('/', 'lpt1', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'LPT2', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'Lpt4', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'lPT7.foo', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'b/lpT9', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+
+            // Names should not end with period or whitespace.
+            function(helper) { helper.getFile('/', 'foo ', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'foo\n', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.getFile('/', 'foo.', {create:true}, FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/a', '/', 'foo ', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/a', '/', 'foo\t', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.copy('/a', '/', 'foo.', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.move('/a', '/', 'foo ', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.move('/a', '/', 'foo\t', FileError.INVALID_MODIFICATION_ERR); },
+            function(helper) { helper.move('/a', '/', 'foo.', FileError.INVALID_MODIFICATION_ERR); },
+        ],
+        postcondition: [
+            {fullPath:'/a', isDirectory:true}
+        ],
+    },
+];
diff --git a/LayoutTests/fast/filesystem/resources/op-tests-helper.js b/LayoutTests/fast/filesystem/resources/op-tests-helper.js
new file mode 100644
index 0000000..bfb0729
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/op-tests-helper.js
@@ -0,0 +1,366 @@
+// Helper routine.
+function toString(obj) {
+    if (obj == undefined) {
+        return "undefined";
+    } else if (typeof obj == 'object') {
+        if (obj.length != undefined) {
+            var stringArray = [];
+            for (var i = 0; i < obj.length; ++i)
+                stringArray.push(toString(obj[i]));
+            stringArray.sort();
+            return '[' + stringArray.join(',\n ') + ']';
+        } else if (obj.isDirectory || obj.isFile) {
+            return 'ENTRY {path:' + obj.fullPath + ' name:' + obj.name + (obj.isDirectory ? ' type:DIRECTORY' : ' type:FILE') + '}';
+        } else {
+            return obj + "";
+        }
+    } else
+        return obj + "";
+}
+
+// Creates a test environment for the given entries where entries is an array of {fullPath:String, isDirectory:boolean} object.
+// When the world is created successfully, successCallback is called with an object that holds all the created entry objects.
+function createTestEnvironment(fileSystem, entries, successCallback, errorCallback)
+{
+    var Helper = function(fileSystem, entries, successCallback, errorCallback)
+    {
+        this.fileSystem = fileSystem;
+        this.entries = entries;
+        this.current = 0;
+        this.successCallback = successCallback;
+        this.errorCallback = errorCallback;
+        this.environment = {};
+
+        this.createSuccessCallback = function(entry)
+        {
+            this.environment[entry.fullPath] = entry;
+            this.createNextEntry();
+        }
+
+        this.createErrorCallback = function(error, entry)
+        {
+            testFailed('Got unexpected error ' + error.code + ' while creating ' + toString(entry));
+            this.errorCallback(error);
+        }
+
+        this.createNextEntry = function()
+        {
+            if (this.current >= this.entries.length) {
+                this.successCallback(this.environment);
+                return;
+            }
+            var entry = this.entries[this.current++];
+            if (entry.isDirectory)
+                fileSystem.root.getDirectory(entry.fullPath, {create:true}, bindCallback(this, this.createSuccessCallback), bindCallback(this, this.createErrorCallback));
+            else
+                fileSystem.root.getFile(entry.fullPath, {create:true}, bindCallback(this, this.createSuccessCallback), bindCallback(this, this.createErrorCallback));
+        };
+    };
+
+    if (!entries || !entries.length) {
+        successCallback({});
+        return;
+    }
+    var helper = new Helper(fileSystem, entries, successCallback, errorCallback);
+    helper.createNextEntry();
+}
+
+function verifyTestEnvironment(fileSystem, entries, successCallback, errorCallback)
+{
+    var Helper = function(fileSystem, entries, successCallback, errorCallback)
+    {
+        this.fileSystem = fileSystem;
+        this.entries = entries;
+        this.current = 0;
+        this.successCallback = successCallback;
+        this.errorCallback = errorCallback;
+        this.expectedNonexistent = false;
+
+        this.verifySuccessCallback = function(entry)
+        {
+            if (this.expectedNonexistent) {
+                testFailed('Found unexpected entry ' + entry.fullPath);
+                this.errorCallback();
+                return;
+            }
+            testPassed('Verified entry: ' + toString(entry));
+            this.verifyNextEntry();
+        }
+
+        this.verifyErrorCallback = function(error, entry)
+        {
+            if (this.expectedNonexistent) {
+                testPassed('Verified entry does NOT exist: ' + entry.fullPath);
+                this.verifyNextEntry();
+                return;
+            }
+            if (error == FileError.NOT_FOUND_ERR)
+                testFailed('Not found: ' + entry.fullPath);
+            else
+                testFailed('Got unexpected error ' + error.code + ' for ' + entry.fullPath);
+            this.errorCallback(error);
+        }
+
+        this.verifyNextEntry = function()
+        {
+            if (this.current >= this.entries.length) {
+                this.successCallback();
+                return;
+            }
+            var entry = this.entries[this.current++];
+            this.expectedNonexistent = entry.nonexistent;
+            if (entry.isDirectory)
+                fileSystem.root.getDirectory(entry.fullPath, {}, bindCallback(this, this.verifySuccessCallback), bindCallback(this, this.verifyErrorCallback, entry));
+            else
+                fileSystem.root.getFile(entry.fullPath, {}, bindCallback(this, this.verifySuccessCallback), bindCallback(this, this.verifyErrorCallback, entry));
+        };
+    };
+
+    if (!entries || !entries.length) {
+        successCallback();
+        return;
+    }
+    var helper = new Helper(fileSystem, entries, successCallback, errorCallback);
+    helper.verifyNextEntry();
+}
+
+// testCase must have precondition, postcondition and test function field.
+// (See resources/op-*.js for examples.)
+function runOperationTest(fileSystem, testCase, successCallback, errorCallback)
+{
+    var OperationTestHelper = function(fileSystem, testCase, successCallback, errorCallback)
+    {
+        this.fileSystem = fileSystem;
+        this.testCase = testCase;
+        this.successCallback = successCallback;
+        this.errorCallback = errorCallback;
+        this.stage = '';
+        this.environment = {};
+        this.currentTest = 0;
+
+        this.currentReader = null;
+        this.readEntries = [];
+
+        this.testSuccessCallback = function()
+        {
+            if (!this.expectedErrorCode) {
+                testPassed('Succeeded: ' + this.stage);
+                this.runNextTest();
+            } else {
+                testFailed('Unexpectedly succeeded while ' + this.stage);
+                this.errorCallback();
+            }
+        };
+
+        this.entry = null;
+        this.testGetSuccessCallback = function(entry)
+        {
+            if (!this.expectedErrorCode) {
+                testPassed('Succeeded: ' + this.stage);
+                this.entry = entry;
+                shouldBe.apply(this, ['this.environment[this.entry.fullPath].fullPath', '"' + entry.fullPath + '"']);
+                shouldBe.apply(this, ['this.environment[this.entry.fullPath].isFile + ""', '"' + entry.isFile + '"']);
+                shouldBe.apply(this, ['this.environment[this.entry.fullPath].isDirectory + ""', '"' + entry.isDirectory + '"']);
+                this.runNextTest();
+            } else {
+                testFailed('Unexpectedly succeeded while ' + this.stage);
+                this.errorCallback(error);
+            }
+        };
+
+        this.testCreateSuccessCallback = function(entry)
+        {
+            if (!this.expectedErrorCode) {
+                testPassed('Succeeded: ' + this.stage);
+                this.environment[entry.fullPath] = entry;
+                this.runNextTest();
+            } else {
+                testFailed('Unexpectedly succeeded while ' + this.stage);
+                this.errorCallback();
+            }
+        };
+
+        this.testGetParentSuccessCallback = function(entry)
+        {
+            if (!this.expectedErrorCode) {
+                testPassed('Succeeded: ' + this.stage);
+                debug('Parent entry: ' + toString(entry));
+                this.runNextTest();
+            } else {
+                testFailed('Unexpectedly succeeded while ' + this.stage);
+                this.errorCallback();
+            }
+        };
+
+        this.testReadEntriesSuccessCallback = function(entries)
+        {
+            if (this.expectedErrorCode) {
+                testFailed('Unexpectedly succeeded while ' + this.stage);
+                this.errorCallback(error);
+                return;
+            }
+
+            for (var i = 0; i < entries.length; ++i)
+                this.readEntries.push(entries[i]);
+
+            if (entries.length) {
+                this.currentReader.readEntries(bindCallback(this, this.testReadEntriesSuccessCallback), bindCallback(this, this.testErrorCallback));
+                return;
+            }
+
+            testPassed('Succeeded: ' + this.stage);
+            debug('Entries: ' + toString(this.readEntries));
+            this.runNextTest();
+        };
+
+        this.testErrorCallback = function(error)
+        {
+            if (this.expectedErrorCode) {
+                shouldBe.apply(this, ['this.expectedErrorCode + ""', '"' + error.code + '"']);
+                this.runNextTest();
+            } else {
+                testFailed('Got unexpected error ' + error.code + ' while ' + this.stage);
+                this.errorCallback(error);
+            }
+        };
+
+        // Operations ---------------------------------------------------
+
+        this.getFile = function(entry, path, flags, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".getFile("' + path + '")';
+            var successCallback = (flags && flags.create) ? this.testCreateSuccessCallback : this.testGetSuccessCallback;
+            this.environment[entry].getFile(path, flags, bindCallback(this, successCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.getDirectory = function(entry, path, flags, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".getDirectory("' + path + '")';
+            var successCallback = (flags && flags.create) ? this.testCreateSuccessCallback : this.testGetSuccessCallback;
+            this.environment[entry].getDirectory(path, flags, bindCallback(this, successCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.getParent = function(entry, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".getParent()';
+            this.environment[entry].getParent(bindCallback(this, this.testGetParentSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.getMetadata = function(entry, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".getMetadata()';
+            this.environment[entry].getMetadata(bindCallback(this, this.testSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.remove = function(entry, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".remove()';
+            this.environment[entry].remove(bindCallback(this, this.testSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.readDirectory = function(entry, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.readEntries = [];
+            this.stage = '"' + entry + '".createReader().readEntries()';
+            this.currentReader = this.environment[entry].createReader();
+            this.currentReader.readEntries(bindCallback(this, this.testReadEntriesSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.copy = function(entry, destinationParent, newName, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".copyTo("' + destinationParent + '", "' + newName + '")';
+            this.environment[entry].copyTo(this.environment[destinationParent], newName, bindCallback(this, this.testSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.move = function(entry, destinationParent, newName, expectedErrorCode)
+        {
+            this.expectedErrorCode = expectedErrorCode;
+            this.stage = '"' + entry + '".moveTo("' + destinationParent + '", "' + newName + '")';
+            this.environment[entry].moveTo(this.environment[destinationParent], newName, bindCallback(this, this.testSuccessCallback), bindCallback(this, this.testErrorCallback));
+        };
+
+        //---------------------------------------------------------------
+        this.start = function()
+        {
+            this.expectedErrorCode = '';
+            this.stage = 'resetting filesystem';
+            removeRecursively(this.fileSystem.root, bindCallback(this, this.setUp), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.setUp = function()
+        {
+            this.expectedErrorCode = '';
+            this.stage = 'setting up test precondition';
+            createTestEnvironment(this.fileSystem, this.testCase.precondition, bindCallback(this, this.runTests), bindCallback(this, this.testErrorCallback));
+        };
+
+        this.runNextTest = function()
+        {
+            if (this.currentTest >= this.testCase.tests.length) {
+                this.verify();
+                return;
+            }
+            this.testCase.tests[this.currentTest++](this);
+        };
+
+        this.runTests = function(environment)
+        {
+            this.environment = environment;
+            this.environment['/'] = this.fileSystem.root;
+            this.currentTest = 0;
+            this.runNextTest();
+        };
+
+        this.verify = function()
+        {
+            this.expectedErrorCode = '';
+            if (!this.testCase.postcondition) {
+                this.successCallback();
+                return;
+            }
+            this.stage = 'verifying test postcondition';
+            verifyTestEnvironment(this.fileSystem, this.testCase.postcondition, this.successCallback, bindCallback(this, this.testErrorCallback));
+        };
+    };
+
+    var helper = new OperationTestHelper(fileSystem, testCase, successCallback, errorCallback);
+    helper.start();
+}
+
+var currentTest = 0;
+var fileSystem = null;
+function runNextTest() {
+    if (currentTest >= testCases.length) {
+        debug('Finished running tests.');
+        finishJSTest();
+        return;
+    }
+
+    var testCase = testCases[currentTest++];
+    debug('* Running: ' + testCase.name);
+    runOperationTest(fileSystem, testCase, runNextTest, errorCallback);
+}
+
+function errorCallback(error) {
+    if (error && error.code)
+        testFailed('Got error ' + error.code);
+    finishJSTest();
+}
+
+function fileSystemCallback(fs)
+{
+    fileSystem = fs;
+    runNextTest();
+}
+
+var jsTestIsAsync = true;
+requestFileSystem(TEMPORARY, 100, fileSystemCallback, errorCallback);
+var successfullyParsed = true;
+

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list