Title: [128018] trunk
Revision
128018
Author
[email protected]
Date
2012-09-09 23:22:35 -0700 (Sun, 09 Sep 2012)

Log Message

successCallback of ResolveLocalFileSystemURL should not be optional.
https://bugs.webkit.org/show_bug.cgi?id=94802

Patch by Taiju Tsuiki <[email protected]> on 2012-09-09
Reviewed by Kent Tamura.

Spec says it should not optional.
http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL-void-DOMString-url-EntryCallback-successCallback-ErrorCallback-errorCallback

Source/WebCore:

Tests: fast/filesystem/entry-points-missing-arguments.html

* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:

LayoutTests:

* fast/filesystem/entry-points-missing-arguments-expected.txt: Added.
* fast/filesystem/entry-points-missing-arguments.html: Added.
* fast/filesystem/filesystem-no-callback-null-ptr-crash.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128017 => 128018)


--- trunk/LayoutTests/ChangeLog	2012-09-10 05:53:47 UTC (rev 128017)
+++ trunk/LayoutTests/ChangeLog	2012-09-10 06:22:35 UTC (rev 128018)
@@ -1,3 +1,17 @@
+2012-09-09  Taiju Tsuiki  <[email protected]>
+
+        successCallback of ResolveLocalFileSystemURL should not be optional.
+        https://bugs.webkit.org/show_bug.cgi?id=94802
+
+        Reviewed by Kent Tamura.
+
+        Spec says it should not optional.
+        http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL-void-DOMString-url-EntryCallback-successCallback-ErrorCallback-errorCallback
+
+        * fast/filesystem/entry-points-missing-arguments-expected.txt: Added.
+        * fast/filesystem/entry-points-missing-arguments.html: Added.
+        * fast/filesystem/filesystem-no-callback-null-ptr-crash.html:
+
 2012-09-09  Csaba Osztrogonác  <[email protected]>
 
         [Qt] Unreviewed gardening, skip new failing tests to paint the bots green.

Added: trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments-expected.txt (0 => 128018)


--- trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments-expected.txt	2012-09-10 06:22:35 UTC (rev 128018)
@@ -0,0 +1,14 @@
+Ensures that we get exceptions when we do not include required arguments for webkitRequestFileSystem and webkitResolveLocalFileSystemURL methods.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS webkitResolveLocalFileSystemURL() threw exception TypeError: Not enough arguments.
+PASS webkitResolveLocalFileSystemURL("") threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem() threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem(TEMPORARY) threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem(TEMPORARY, 1) threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments.html (0 => 128018)


--- trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments.html	                        (rev 0)
+++ trunk/LayoutTests/fast/filesystem/entry-points-missing-arguments.html	2012-09-10 06:22:35 UTC (rev 128018)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src=""
+<script>
+description('Ensures that we get exceptions when we do not include required arguments for webkitRequestFileSystem and webkitResolveLocalFileSystemURL methods.');
+
+if (window.webkitResolveLocalFileSystemURL) {
+    var notEnoughArguments = '"TypeError: Not enough arguments"';
+    shouldThrow('webkitResolveLocalFileSystemURL()', notEnoughArguments);
+    shouldThrow('webkitResolveLocalFileSystemURL("")', notEnoughArguments);
+    shouldThrow('webkitRequestFileSystem()', notEnoughArguments);
+    shouldThrow('webkitRequestFileSystem(TEMPORARY)', notEnoughArguments);
+    shouldThrow('webkitRequestFileSystem(TEMPORARY, 1)', notEnoughArguments);
+} else
+    debug("This test requires window.webkitResolveLocalFileSystemURL.");
+</script>
+<script src=""

Modified: trunk/LayoutTests/fast/filesystem/filesystem-no-callback-null-ptr-crash.html (128017 => 128018)


--- trunk/LayoutTests/fast/filesystem/filesystem-no-callback-null-ptr-crash.html	2012-09-10 05:53:47 UTC (rev 128017)
+++ trunk/LayoutTests/fast/filesystem/filesystem-no-callback-null-ptr-crash.html	2012-09-10 06:22:35 UTC (rev 128018)
@@ -8,7 +8,7 @@
       testRunner.dumpAsText();
   if (window.webkitRequestFileSystem) {
       // These two calls should throw an exception but should NOT cause a NULL pointer crash:
-      webkitResolveLocalFileSystemURL('');
+      webkitResolveLocalFileSystemURL('', function() {});
       try {
           webkitRequestFileSystem(TEMPORARY, 100);
       }

Modified: trunk/Source/WebCore/ChangeLog (128017 => 128018)


--- trunk/Source/WebCore/ChangeLog	2012-09-10 05:53:47 UTC (rev 128017)
+++ trunk/Source/WebCore/ChangeLog	2012-09-10 06:22:35 UTC (rev 128018)
@@ -1,3 +1,18 @@
+2012-09-09  Taiju Tsuiki  <[email protected]>
+
+        successCallback of ResolveLocalFileSystemURL should not be optional.
+        https://bugs.webkit.org/show_bug.cgi?id=94802
+
+        Reviewed by Kent Tamura.
+
+        Spec says it should not optional.
+        http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL-void-DOMString-url-EntryCallback-successCallback-ErrorCallback-errorCallback
+
+        Tests: fast/filesystem/entry-points-missing-arguments.html
+
+        * Modules/filesystem/DOMWindowFileSystem.idl:
+        * Modules/filesystem/WorkerContextFileSystem.idl:
+
 2012-09-09  Patrick Gansterer  <[email protected]>
 
         Add StringBuilder::appendNumber() and use it

Modified: trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl (128017 => 128018)


--- trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl	2012-09-10 05:53:47 UTC (rev 128017)
+++ trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl	2012-09-10 06:22:35 UTC (rev 128018)
@@ -36,7 +36,7 @@
         [V8EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(in unsigned short type, in long long size,
                 in [Callback] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
         [V8EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(in DOMString url,
-                in [Callback, Optional] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
+                in [Callback] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
     };
 
 }

Modified: trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl (128017 => 128018)


--- trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl	2012-09-10 05:53:47 UTC (rev 128017)
+++ trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl	2012-09-10 06:22:35 UTC (rev 128018)
@@ -35,7 +35,7 @@
 
         [V8EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(in unsigned short type, in long long size, in [Callback, Optional] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
         [V8EnabledAtRuntime=FileSystem] DOMFileSystemSync webkitRequestFileSystemSync(in unsigned short type, in long long size) raises (FileException);
-        [V8EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(in DOMString url, in [Callback, Optional] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
+        [V8EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(in DOMString url, in [Callback] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
         [V8EnabledAtRuntime=FileSystem] EntrySync webkitResolveLocalFileSystemSyncURL(in DOMString url) raises (FileException);
 
         attribute [V8EnabledAtRuntime=FileSystem] FileErrorConstructor FileError;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to