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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 16:31:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 13c5eff3494aa77bfea73b715e28e3b625e86117
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 24 23:59:32 2010 +0000

    2010-11-24  Eric Uhrhane  <ericu at chromium.org>
    
            Reviewed by David Levin.
    
            Add FileWriter test utilities.
            https://bugs.webkit.org/show_bug.cgi?id=47680
    
            Cleaning up shared test utility files caused the includes and output of
            a bunch of existing tests change slightly, so I've rebuilt the
            expectation files.
    
            This is the first test [in DOM and worker versions] to use the new utilities.
            * fast/filesystem/file-writer-truncate-extend-expected.txt: Added.
            * fast/filesystem/file-writer-truncate-extend.html: Added.
            * fast/filesystem/resources/file-writer-truncate-extend.js: Added.
            * fast/filesystem/workers/file-writer-truncate-extend-expected.txt: Added.
            * fast/filesystem/workers/file-writer-truncate-extend.html: Added.
    
            This is a new utility file for FileWriter tests.
            * fast/filesystem/resources/file-writer-utils.js: Added.
    
            Touched up a bit
            * fast/filesystem/resources/fs-worker-common.js:
    
            Removed
            * fast/filesystem/resources/fs-worker-test-post.js:
    
            * fast/filesystem/resources/fs-worker-test-pre.js:
            renamed to
            * fast/filesystem/resources/fs-worker-test-util.js:
    
            These tests and their expectations were tweaked slightly to use the new code more cleanly.
            * fast/filesystem/workers/async-operations-expected.txt:
            * fast/filesystem/workers/async-operations.html:
            * fast/filesystem/workers/file-from-file-entry-expected.txt:
            * fast/filesystem/workers/file-from-file-entry-sync-expected.txt:
            * fast/filesystem/workers/file-from-file-entry-sync.html:
            * fast/filesystem/workers/file-from-file-entry.html:
            * fast/filesystem/workers/simple-persistent-expected.txt:
            * fast/filesystem/workers/simple-persistent-sync-expected.txt:
            * fast/filesystem/workers/simple-persistent-sync.html:
            * fast/filesystem/workers/simple-persistent.html:
            * fast/filesystem/workers/simple-temporary-expected.txt:
            * fast/filesystem/workers/simple-temporary-sync-expected.txt:
            * fast/filesystem/workers/simple-temporary-sync.html:
            * fast/filesystem/workers/simple-temporary.html:
            * fast/filesystem/workers/sync-operations-expected.txt:
            * fast/filesystem/workers/sync-operations.html:
    
            Removed suppression of FileWriter tests, as we now have support in TestShell.
            * platform/chromium/test_expectations.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f32bdba..636c3c2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,55 @@
+2010-11-24  Eric Uhrhane  <ericu at chromium.org>
+
+        Reviewed by David Levin.
+
+        Add FileWriter test utilities.
+        https://bugs.webkit.org/show_bug.cgi?id=47680
+
+        Cleaning up shared test utility files caused the includes and output of
+        a bunch of existing tests change slightly, so I've rebuilt the
+        expectation files.
+
+        This is the first test [in DOM and worker versions] to use the new utilities.
+        * fast/filesystem/file-writer-truncate-extend-expected.txt: Added.
+        * fast/filesystem/file-writer-truncate-extend.html: Added.
+        * fast/filesystem/resources/file-writer-truncate-extend.js: Added.
+        * fast/filesystem/workers/file-writer-truncate-extend-expected.txt: Added.
+        * fast/filesystem/workers/file-writer-truncate-extend.html: Added.
+        
+        This is a new utility file for FileWriter tests.
+        * fast/filesystem/resources/file-writer-utils.js: Added.
+
+        Touched up a bit
+        * fast/filesystem/resources/fs-worker-common.js:
+
+        Removed
+        * fast/filesystem/resources/fs-worker-test-post.js:
+
+        * fast/filesystem/resources/fs-worker-test-pre.js:
+        renamed to 
+        * fast/filesystem/resources/fs-worker-test-util.js:
+
+        These tests and their expectations were tweaked slightly to use the new code more cleanly.
+        * fast/filesystem/workers/async-operations-expected.txt:
+        * fast/filesystem/workers/async-operations.html:
+        * fast/filesystem/workers/file-from-file-entry-expected.txt:
+        * fast/filesystem/workers/file-from-file-entry-sync-expected.txt:
+        * fast/filesystem/workers/file-from-file-entry-sync.html:
+        * fast/filesystem/workers/file-from-file-entry.html:
+        * fast/filesystem/workers/simple-persistent-expected.txt:
+        * fast/filesystem/workers/simple-persistent-sync-expected.txt:
+        * fast/filesystem/workers/simple-persistent-sync.html:
+        * fast/filesystem/workers/simple-persistent.html:
+        * fast/filesystem/workers/simple-temporary-expected.txt:
+        * fast/filesystem/workers/simple-temporary-sync-expected.txt:
+        * fast/filesystem/workers/simple-temporary-sync.html:
+        * fast/filesystem/workers/simple-temporary.html:
+        * fast/filesystem/workers/sync-operations-expected.txt:
+        * fast/filesystem/workers/sync-operations.html:
+
+        Removed suppression of FileWriter tests, as we now have support in TestShell.
+        * platform/chromium/test_expectations.txt:
+
 2010-11-24  Nico Weber  <thakis at chromium.org>
 
         Unreviewed.
diff --git a/LayoutTests/fast/filesystem/file-writer-truncate-extend-expected.txt b/LayoutTests/fast/filesystem/file-writer-truncate-extend-expected.txt
new file mode 100644
index 0000000..ee48d01
--- /dev/null
+++ b/LayoutTests/fast/filesystem/file-writer-truncate-extend-expected.txt
@@ -0,0 +1,9 @@
+Test of extending a file using truncate().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+starting test
+PASS Truncate extension verified.
+PASS successfullyParsed is true
+
+TEST COMPLETE
diff --git a/LayoutTests/fast/filesystem/file-writer-truncate-extend.html b/LayoutTests/fast/filesystem/file-writer-truncate-extend.html
new file mode 100644
index 0000000..dc6959b
--- /dev/null
+++ b/LayoutTests/fast/filesystem/file-writer-truncate-extend.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+    <link rel="stylesheet" href="../js/resources/js-test-style.css">
+    <title>File Writer Truncate-To-Extend</title>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/file-writer-utils.js"></script>
+ </head>
+ <body>
+    <div id="description"></div>
+    <div id="console"></div>
+    <script src="resources/file-writer-truncate-extend.js"></script>
+    <script src="../js/resources/js-test-post.js"></script>
+ </body>
+</html>
+
+
diff --git a/LayoutTests/fast/filesystem/resources/file-writer-truncate-extend.js b/LayoutTests/fast/filesystem/resources/file-writer-truncate-extend.js
new file mode 100644
index 0000000..2fa8abd
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/file-writer-truncate-extend.js
@@ -0,0 +1,38 @@
+if (this.importScripts) {
+    importScripts('fs-worker-common.js');
+    importScripts('file-writer-utils.js');
+}
+
+description("Test of extending a file using truncate().");
+
+function onTestSucceeded()
+{
+    testPassed("Truncate extension verified.");
+    cleanUp();
+}
+
+function truncateToExtend(fileEntry, fileWriter, contents, onSuccess)
+{
+    var extension = 5;
+    var lengthChecker = function() {
+        verifyFileLength(fileEntry, contents.length + extension, onSuccess);
+    };
+    var extensionChecker = function() {
+        verifyByteRangeIsZeroes(fileEntry, contents.length, extension, lengthChecker);
+    };
+    fileWriter.onwrite = function() {
+        verifyByteRangeAsString(fileEntry, 0, contents, extensionChecker);
+    };
+    fileWriter.truncate(contents.length + extension);
+}
+
+function runTest(fileEntry, fileWriter) {
+    var contents = "Lorem ipsum";
+    writeString(fileEntry, fileWriter, 0, contents,
+                function() {
+                    truncateToExtend(fileEntry, fileWriter, contents, onTestSucceeded);
+                });
+}
+
+var jsTestIsAsync = true;
+setupAndRunTest(1024, 'file-writer-truncate-extend', runTest);
diff --git a/LayoutTests/fast/filesystem/resources/file-writer-utils.js b/LayoutTests/fast/filesystem/resources/file-writer-utils.js
new file mode 100644
index 0000000..91d52b2
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/file-writer-utils.js
@@ -0,0 +1,148 @@
+function stringifyObj(o)
+{
+    s = "";
+    if (o)
+        for (index in o) {
+            s += index + ": " + o[index] + ";";
+        }
+    return s;
+}
+
+function onError(e)
+{
+    testFailed("Got error: " + stringifyObj(e));
+    cleanUp();
+}
+
+function assert(s)
+{
+    if (!s)
+        onError(new Error("Assertion failed. "));
+}
+
+var fileEntryForCleanup;  // Set as soon as we have one.
+
+function cleanUp()
+{
+    try {
+        if (fileEntryForCleanup)
+            fileEntryForCleanup.remove(finishJSTest, finishJSTest);
+    } catch (ex) {
+        finishJSTest();
+    }
+}
+
+// Generic function that gets a File from a FileEntry and calls a custom verification function on it.
+function verifyFileContents(fileEntry, verifyFunc, arg0, arg1, onSuccess)
+{
+    fileEntry.file(
+        function(file) {
+            verifyFunc(file, arg0, arg1, onSuccess);
+        },
+        onError);
+}
+
+// Helper function used with verifyFileContents.
+function verifyFileLengthHelper(file, length, unused, onSuccess)
+{
+    assert(file.size == length);
+    onSuccess();
+}
+
+// Verifies that the contents of fileEntry have the supplied length.
+function verifyFileLength(fileEntry, length, onSuccess)
+{
+    verifyFileContents(fileEntry, verifyFileLengthHelper, length, null, onSuccess);
+}
+
+// Helper function used with verifyFileContents.
+function verifyByteRangeIsZeroesHelper(file, start, length, onSuccess)
+{
+    var fileReader = new FileReader();
+    fileReader.onerror = onError;
+    fileReader.onload =
+        function() {
+            var result = fileReader.result;
+            for (var i = 0; i < length; i++)
+                assert(result.charCodeAt(i) == 0);
+            onSuccess();
+        };
+    fileReader.readAsBinaryString(file.slice(start, length));
+}
+
+// Verifies that fileEntry, at offset, is all zeroes for length bytes.
+function verifyByteRangeIsZeroes(fileEntry, offset, length, onSuccess)
+{
+    verifyFileContents(fileEntry, verifyByteRangeIsZeroesHelper, offset, length, onSuccess);
+}
+
+// Helper function used with verifyFileContents.
+function verifyByteRangeAsStringHelper(file, start, data, onSuccess)
+{
+    var fileReader = new FileReader();
+    fileReader.onerror = onError;
+    fileReader.onload =
+        function() {
+            assert(fileReader.result == data);
+            onSuccess();
+        };
+    fileReader.readAsText(file.slice(start, data.length));
+}
+
+// Verifies that the contents of fileEntry, at offset, match contents [a string].
+function verifyByteRangeAsString(fileEntry, offset, contents, onSuccess)
+{
+    verifyFileContents(fileEntry, verifyByteRangeAsStringHelper, offset, contents, onSuccess);
+}
+
+// Creates a file called fileName in fileSystem's root directory, truncates it to zero length just in case, and calls onSuccess, passing it a FileEntry and FileWriter for the new file.
+function createEmptyFile(fileSystem, fileName, onSuccess)
+{
+    function getSuccessFunc(fileEntry, fileWriter) {
+        return function() {
+            onSuccess(fileEntry, fileWriter);
+        }
+    }
+    function getFileWriterCallback(fileEntry) {
+        return function(fileWriter) {
+            var successFunc = getSuccessFunc(fileEntry, fileWriter);
+            fileWriter.onError = onError;
+            fileWriter.onwrite = function() {
+                verifyFileLength(fileEntry, 0, successFunc);
+            };
+            fileWriter.truncate(0);
+        }
+    }
+    function onFileEntry(fileEntry) {
+        fileEntryForCleanup = fileEntry;
+        var onFileWriter = getFileWriterCallback(fileEntry);
+        fileEntry.createWriter(onFileWriter, onError);
+    }
+    assert(fileSystem);
+    fileSystem.root.getFile(fileName, {create:true}, onFileEntry, onError);
+}
+
+function writeString(fileEntry, fileWriter, offset, data, onSuccess)
+{
+    var bb = new BlobBuilder();
+    bb.append(data);
+    var blob = bb.getBlob();
+    fileWriter.seek(offset);
+    fileWriter.write(blob);
+    fileWriter.onwrite = function() {
+        verifyByteRangeAsString(fileEntry, offset, data, onSuccess);
+    };
+}
+
+function setupAndRunTest(size, testName, testFunc)
+{
+    if (!requestFileSystem) {
+        debug("This test requires FileSystem API support.");
+        return;
+    }
+    debug("starting test");
+    requestFileSystem(TEMPORARY, size, function(fs) {
+        createEmptyFile(fs, testName, testFunc);
+    }, onError);
+}
+
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-common.js b/LayoutTests/fast/filesystem/resources/fs-worker-common.js
index aacdda2..f634122 100644
--- a/LayoutTests/fast/filesystem/resources/fs-worker-common.js
+++ b/LayoutTests/fast/filesystem/resources/fs-worker-common.js
@@ -1,16 +1,24 @@
 function debug(message)
 {
-    postMessage(message);
+    postMessage("MESG:" + message);
 }
 
 function finishJSTest()
 {
-    postMessage("DONE");
+    postMessage("DONE:");
 }
 
 function description(message)
 {
-    postMessage('Description: ' + message);
+    postMessage('DESC:' + message);
+}
+
+function testPassed(msg) {
+    postMessage("PASS:" + msg);
+}
+
+function testFailed(msg) {
+    postMessage("FAIL:" + msg);
 }
 
 function shouldBe(_a, _b)
@@ -20,9 +28,9 @@ function shouldBe(_a, _b)
   var _av = eval(_a);
   var _bv = eval(_b);
   if (_av === _bv)
-    debug("PASS: " + _a + " is " + _b);
+    testPassed(_a + " is " + _b);
   else
-    debug("FAIL: " + _a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
+    testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
 }
 
 function shouldBeTrue(_a) { shouldBe(_a, "true"); }
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js b/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js
deleted file mode 100644
index 234b025..0000000
--- a/LayoutTests/fast/filesystem/resources/fs-worker-test-post.js
+++ /dev/null
@@ -1,8 +0,0 @@
-wasPostTestScriptParsed = true;
-
-if (window.layoutTestController) {
-    layoutTestController.waitUntilDone();
-    window.jsTestIsAsync = true;
-}
-if (window.wasFinishJSTestCalled)
-    finishJSTest();
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js b/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js
deleted file mode 100644
index 6d9a873..0000000
--- a/LayoutTests/fast/filesystem/resources/fs-worker-test-pre.js
+++ /dev/null
@@ -1,36 +0,0 @@
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
-
-function debug(message)
-{
-    document.getElementById("console").innerHTML += message + "<br/>";
-}
-
-function startWorker(testScriptURL)
-{
-    debug('Starting worker: ' + testScriptURL);
-    var worker = new Worker(testScriptURL);
-    worker.onmessage = function(event)
-    {
-        debug(event.data);
-        if (event.data == "DONE")
-            finishJSTest();
-    };
-
-    worker.onerror = function(event)
-    {
-        alert(event);
-        debug('Got error from worker: ' + event.message);
-        finishJSTest();
-    }
-}
-
-function finishJSTest()
-{
-    wasFinishJSTestCalled = true;
-    if (!window.wasPostTestScriptParsed)
-        return;
-    debug('<br /><span class="pass">TEST COMPLETE</span>');
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-}
diff --git a/LayoutTests/fast/filesystem/resources/fs-worker-test-util.js b/LayoutTests/fast/filesystem/resources/fs-worker-test-util.js
new file mode 100644
index 0000000..2a738aa
--- /dev/null
+++ b/LayoutTests/fast/filesystem/resources/fs-worker-test-util.js
@@ -0,0 +1,32 @@
+window.jsTestIsAsync = true;
+
+function startWorker(testScriptURL)
+{
+    debug('Starting worker: ' + testScriptURL);
+    var worker = new Worker(testScriptURL);
+    worker.onmessage = function(event)
+    {
+        if (event.data.length < 5 || event.data.charAt(4) != ':') {
+            debug("Got invalid message from worker:" + (event.data ? event.data : "null"));
+        } else {
+            var code = event.data.substring(0, 4);
+            var payload = "[Worker] " + event.data.substring(5);
+            if (code == "PASS")
+                testPassed(payload);
+            else if (code == "FAIL")
+                testFailed(payload);
+            else if (code == "DESC")
+                description(payload);
+            else if (code == "DONE")
+                finishJSTest();
+            else if (code == "MESG")
+                debug(payload);
+        }
+    };
+
+    worker.onerror = function(event)
+    {
+        debug('Got error from worker: ' + event.message);
+        finishJSTest();
+    }
+}
diff --git a/LayoutTests/fast/filesystem/workers/async-operations-expected.txt b/LayoutTests/fast/filesystem/workers/async-operations-expected.txt
index 6dbd7d7..5a2ff54 100644
--- a/LayoutTests/fast/filesystem/workers/async-operations-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/async-operations-expected.txt
@@ -1,15 +1,17 @@
-This tests running multiple async filesystem operations in Worker.
+[Worker] Test making multiple async FileSystem operations.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/async-operations.js
-Description: Test making multiple async FileSystem operations.
-requested FileSystem.
-Got FileSystem:file__0:Temporary
-Starting async test stage 1.
-Starting async test stage 2.
-Verifying the FileSystem status.
-PASS: "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
-PASS: dirsCount is 3
-DONE
+[Worker] requested FileSystem.
+[Worker] Got FileSystem:file__0:Temporary
+[Worker] Starting async test stage 1.
+[Worker] Starting async test stage 2.
+[Worker] Verifying the FileSystem status.
+PASS [Worker] "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
+PASS [Worker] dirsCount is 3
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/async-operations.html b/LayoutTests/fast/filesystem/workers/async-operations.html
index 7a7cc4f..749c4d8 100644
--- a/LayoutTests/fast/filesystem/workers/async-operations.html
+++ b/LayoutTests/fast/filesystem/workers/async-operations.html
@@ -1,15 +1,17 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests running multiple async filesystem operations in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/async-operations.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/fast/filesystem/workers/file-from-file-entry-expected.txt b/LayoutTests/fast/filesystem/workers/file-from-file-entry-expected.txt
index a3bdb55..5c7279d 100644
--- a/LayoutTests/fast/filesystem/workers/file-from-file-entry-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/file-from-file-entry-expected.txt
@@ -1,11 +1,13 @@
-This tests returning File from FileEntry in workers.
+[Worker] Obtaining File from FileEntry.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/file-from-file-entry.js
-Description: Obtaining File from FileEntry.
-PASS: testFile.name is testFileEntry.name
-PASS: testFile.type is 'text/plain'
-PASS: testFile.size is 0
-DONE
+PASS [Worker] testFile.name is testFileEntry.name
+PASS [Worker] testFile.type is 'text/plain'
+PASS [Worker] testFile.size is 0
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync-expected.txt b/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync-expected.txt
index 7b5982f..f060f35 100644
--- a/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync-expected.txt
@@ -1,11 +1,13 @@
-This tests returning File from FileEntrySync in workers.
+[Worker] Obtaining File from FileEntrySync.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/file-from-file-entry-sync.js
-Description: Obtaining File from FileEntrySync.
-PASS: testFile.name is testFileEntry.name
-PASS: testFile.type is 'text/plain'
-PASS: testFile.size is 0
-DONE
+PASS [Worker] testFile.name is testFileEntry.name
+PASS [Worker] testFile.type is 'text/plain'
+PASS [Worker] testFile.size is 0
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html b/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html
index 4751fdf..04b7e1b 100644
--- a/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html
+++ b/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html
@@ -1,14 +1,16 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests returning File from FileEntrySync in workers.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/file-from-file-entry-sync.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/filesystem/workers/file-from-file-entry.html b/LayoutTests/fast/filesystem/workers/file-from-file-entry.html
index 03e7415..ab1d319 100644
--- a/LayoutTests/fast/filesystem/workers/file-from-file-entry.html
+++ b/LayoutTests/fast/filesystem/workers/file-from-file-entry.html
@@ -1,14 +1,16 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests returning File from FileEntry in workers.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/file-from-file-entry.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend-expected.txt b/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend-expected.txt
new file mode 100644
index 0000000..869adfa
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend-expected.txt
@@ -0,0 +1,11 @@
+[Worker] Test of extending a file using truncate().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+Starting worker: ../resources/file-writer-truncate-extend.js
+[Worker] starting test
+PASS [Worker] Truncate extension verified.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend.html b/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend.html
new file mode 100644
index 0000000..e1412c5
--- /dev/null
+++ b/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+    <link rel="stylesheet" href="../../js/resources/js-test-style.css">
+    <title>File Writer Truncate-To-Extend Worker</title>
+    <script src="../../js/resources/js-test-pre.js"></script>
+    <script src="../resources/fs-worker-test-util.js"></script>
+ </head>
+ <body>
+    <div id="description"></div>
+    <div id="console"></div>
+    <script>
+        startWorker("../resources/file-writer-truncate-extend.js");
+        window.successfullyParsed = true;
+    </script>
+    <script src="../../js/resources/js-test-post.js"></script>
+ </body>
+</html>
+
+
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt b/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt
index f422433..5c439a2 100644
--- a/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt
@@ -1,11 +1,13 @@
-This tests requesting PERSISTENT FileSystem in Worker.
+[Worker] requestFileSystem PERSISTENT test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/simple-persistent.js
-Description: requestFileSystem PERSISTENT test.
-Successfully obtained PERSISTENT FileSystem:file__0:Persistent
-PASS: fileSystem.name.length > 0 is true
-PASS: fileSystem.root.fullPath is "/"
-DONE
+[Worker] Successfully obtained PERSISTENT FileSystem:file__0:Persistent
+PASS [Worker] fileSystem.name.length > 0 is true
+PASS [Worker] fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt b/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt
index 06ab5f5..16b5377 100644
--- a/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt
@@ -1,11 +1,13 @@
-This tests requesting PERSISTENT FileSystemSync in Worker.
+[Worker] requestFileSystemSync PERSISTENT test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/simple-persistent-sync.js
-Description: requestFileSystemSync PERSISTENT test.
-Successfully obtained PERSISTENT FileSystem:file__0:Persistent
-PASS: fileSystem.name.length > 0 is true
-PASS: fileSystem.root.fullPath is "/"
-DONE
+[Worker] Successfully obtained PERSISTENT FileSystem:file__0:Persistent
+PASS [Worker] fileSystem.name.length > 0 is true
+PASS [Worker] fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
index f2f4f66..8de7034 100644
--- a/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
@@ -1,15 +1,17 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests requesting PERSISTENT FileSystemSync in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/simple-persistent-sync.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-persistent.html b/LayoutTests/fast/filesystem/workers/simple-persistent.html
index a15bb84..e8e5f8b 100644
--- a/LayoutTests/fast/filesystem/workers/simple-persistent.html
+++ b/LayoutTests/fast/filesystem/workers/simple-persistent.html
@@ -1,14 +1,16 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests requesting PERSISTENT FileSystem in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/simple-persistent.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt b/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt
index ac83df5..a6532c9 100644
--- a/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt
@@ -1,11 +1,13 @@
-This tests requesting TEMPORARY FileSystem in Worker.
+[Worker] requestFileSystem TEMPORARY test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/simple-temporary.js
-Description: requestFileSystem TEMPORARY test.
-Successfully obtained TEMPORARY FileSystem:file__0:Temporary
-PASS: fileSystem.name.length > 0 is true
-PASS: fileSystem.root.fullPath is "/"
-DONE
+[Worker] Successfully obtained TEMPORARY FileSystem:file__0:Temporary
+PASS [Worker] fileSystem.name.length > 0 is true
+PASS [Worker] fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt b/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt
index 28be090..56a8087 100644
--- a/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt
@@ -1,11 +1,13 @@
-This tests requesting TEMPORARY FileSystemSync in Worker.
+[Worker] requestFileSystemSync TEMPORARY test.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/simple-temporary-sync.js
-Description: requestFileSystemSync TEMPORARY test.
-Successfully obtained TEMPORARY FileSystem:file__0:Temporary
-PASS: fileSystem.name.length > 0 is true
-PASS: fileSystem.root.fullPath is "/"
-DONE
+[Worker] Successfully obtained TEMPORARY FileSystem:file__0:Temporary
+PASS [Worker] fileSystem.name.length > 0 is true
+PASS [Worker] fileSystem.root.fullPath is "/"
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html b/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
index 121613a..ec0319a 100644
--- a/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
@@ -1,15 +1,17 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests requesting TEMPORARY FileSystemSync in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/simple-temporary-sync.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/fast/filesystem/workers/simple-temporary.html b/LayoutTests/fast/filesystem/workers/simple-temporary.html
index d08a327..dcadcc2 100644
--- a/LayoutTests/fast/filesystem/workers/simple-temporary.html
+++ b/LayoutTests/fast/filesystem/workers/simple-temporary.html
@@ -1,14 +1,16 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests requesting TEMPORARY FileSystem in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/simple-temporary.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/filesystem/workers/sync-operations-expected.txt b/LayoutTests/fast/filesystem/workers/sync-operations-expected.txt
index 13855d5..b09deef 100644
--- a/LayoutTests/fast/filesystem/workers/sync-operations-expected.txt
+++ b/LayoutTests/fast/filesystem/workers/sync-operations-expected.txt
@@ -1,10 +1,12 @@
-This tests running multiple sync filesystem operations in Worker.
+[Worker] Test making multiple synchronous FileSystem operations.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
 
 Starting worker: ../resources/sync-operations.js
-Description: Test making multiple synchronous FileSystem operations.
-PASS: "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
-PASS: dirsCount is 3
-DONE
+PASS [Worker] "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
+PASS [Worker] dirsCount is 3
+PASS successfullyParsed is true
 
 TEST COMPLETE
 
diff --git a/LayoutTests/fast/filesystem/workers/sync-operations.html b/LayoutTests/fast/filesystem/workers/sync-operations.html
index 92adf04..35b93be 100644
--- a/LayoutTests/fast/filesystem/workers/sync-operations.html
+++ b/LayoutTests/fast/filesystem/workers/sync-operations.html
@@ -1,15 +1,17 @@
 <html>
 <head>
-<script src="../resources/fs-worker-common.js"></script>
-<script src="../resources/fs-worker-test-pre.js"></script>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/fs-worker-test-util.js"></script>
 </head>
 <body>
-<p id="description">This tests running multiple sync filesystem operations in Worker.</p>
+<p id="description"></p>
 <div id="console"></div>
 <script>
 startWorker('../resources/sync-operations.js');
+window.successfullyParsed = true;
 </script>
-<script src="../resources/fs-worker-test-post.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
 </body>
 </html>
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list