[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:15:52 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 275a95a9119a038b9170ed64084f916463f5ad4f
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 6 01:34:31 2010 +0000

    2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by Jian Li.
    
            FileEntry::file needs to be implemented
            https://bugs.webkit.org/show_bug.cgi?id=47192
    
            Test: fast/filesystem/file-from-file-entry.html
    
            * fileapi/FileEntry.cpp:
            (WebCore::FileEntry::file): Implemented.
    2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by Jian Li.
    
            FileEntry::file needs to be implemented
            https://bugs.webkit.org/show_bug.cgi?id=47192
    
            * fast/filesystem/file-from-file-entry-expected.txt: Added.
            * fast/filesystem/file-from-file-entry.html: Added.
            * fast/filesystem/script-tests/file-from-file-entry.js: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69165 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 92b7528..cfae992 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by Jian Li.
+
+        FileEntry::file needs to be implemented
+        https://bugs.webkit.org/show_bug.cgi?id=47192
+
+        * fast/filesystem/file-from-file-entry-expected.txt: Added.
+        * fast/filesystem/file-from-file-entry.html: Added.
+        * fast/filesystem/script-tests/file-from-file-entry.js: Added.
+
 2010-10-05  Fady Samuel  <fsamuel at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/filesystem/file-from-file-entry-expected.txt b/LayoutTests/fast/filesystem/file-from-file-entry-expected.txt
new file mode 100644
index 0000000..9dfaf96
--- /dev/null
+++ b/LayoutTests/fast/filesystem/file-from-file-entry-expected.txt
@@ -0,0 +1,12 @@
+Obtaining File from FileEntry
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testFile.name is testFileEntry.name
+PASS testFile.type is 'text/plain'
+PASS testFile.size is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/filesystem/file-from-file-entry.html b/LayoutTests/fast/filesystem/file-from-file-entry.html
new file mode 100644
index 0000000..dae708c
--- /dev/null
+++ b/LayoutTests/fast/filesystem/file-from-file-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>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/file-from-file-entry.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/filesystem/script-tests/file-from-file-entry.js b/LayoutTests/fast/filesystem/script-tests/file-from-file-entry.js
new file mode 100644
index 0000000..7552778
--- /dev/null
+++ b/LayoutTests/fast/filesystem/script-tests/file-from-file-entry.js
@@ -0,0 +1,41 @@
+description("Obtaining File from FileEntry");
+
+var fileSystem = null;
+var testFileName = '/testFileEntry.txt';
+var testFileEntry = null;
+var testFile = null;
+
+function errorCallback(error) {
+    testFailed("Error occured:" + error.code);
+    finishJSTest();
+}
+
+function fileCallback(file) {
+    testFile = file;
+    shouldBe("testFile.name", "testFileEntry.name");
+    shouldBe("testFile.type", "'text/plain'");
+    shouldBe("testFile.size", "0");
+    finishJSTest();
+}
+
+function getFileFromEntry(entry) {
+    testFileEntry = entry;
+    entry.file(fileCallback, errorCallback);
+}
+
+function createTestFile() {
+    fileSystem.root.getFile(testFileName, {create:true}, getFileFromEntry, errorCallback);
+}
+
+function fileSystemCallback(fs) {
+    fileSystem = fs;
+    removeRecursively(fileSystem.root, createTestFile, errorCallback);
+}
+
+if (window.requestFileSystem) {
+    window.jsTestIsAsync = true;
+    requestFileSystem(window.TEMPORARY, 100, fileSystemCallback, errorCallback);
+} else
+    debug("This test requires FileSystem API support.");
+
+window.successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 53dc2da..c340dba 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-05  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by Jian Li.
+
+        FileEntry::file needs to be implemented
+        https://bugs.webkit.org/show_bug.cgi?id=47192
+
+        Test: fast/filesystem/file-from-file-entry.html
+
+        * fileapi/FileEntry.cpp:
+        (WebCore::FileEntry::file): Implemented.
+
 2010-09-29  Alpha Lam  <hclam at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/WebCore/fileapi/FileEntry.cpp b/WebCore/fileapi/FileEntry.cpp
index ce0c114..b71a79f 100644
--- a/WebCore/fileapi/FileEntry.cpp
+++ b/WebCore/fileapi/FileEntry.cpp
@@ -33,7 +33,9 @@
 
 #if ENABLE(FILE_SYSTEM)
 
+#include "DOMFileSystem.h"
 #include "ErrorCallback.h"
+#include "File.h"
 #include "FileCallback.h"
 #include "FileWriterCallback.h"
 
@@ -49,9 +51,9 @@ void FileEntry::createWriter(PassRefPtr<FileWriterCallback> successCallback, Pas
     m_fileSystem->createWriter(this, successCallback, errorCallback);
 }
 
-void FileEntry::file(PassRefPtr<FileCallback>, PassRefPtr<ErrorCallback>)
+void FileEntry::file(PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback>)
 {
-    // FIXME: to be implemented.
+    m_fileSystem->scheduleCallback(successCallback, File::create(m_fullPath));
 }
 
 } // namespace

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list