Title: [102305] trunk
Revision
102305
Author
[email protected]
Date
2011-12-07 19:55:33 -0800 (Wed, 07 Dec 2011)

Log Message

[FileSystem API] requestFileSystem successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69637

Patch by Mark Pilgrim <[email protected]> on 2011-12-07
Reviewed by Darin Adler.

Source/WebCore:

* page/DOMWindow.idl: remove [Optional] flag from successCallback parameter

LayoutTests:

* fast/filesystem/filesystem-no-callback-null-ptr-crash.html: fix now-broken logic testing for unrelated bug
* fast/filesystem/not-enough-arguments-expected.txt:
* fast/filesystem/not-enough-arguments.html: add checks for webkitRequestFileSystem with not enough parameters

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (102304 => 102305)


--- trunk/LayoutTests/ChangeLog	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/LayoutTests/ChangeLog	2011-12-08 03:55:33 UTC (rev 102305)
@@ -1,3 +1,14 @@
+2011-12-07  Mark Pilgrim  <[email protected]>
+
+        [FileSystem API] requestFileSystem successCallback is required
+        https://bugs.webkit.org/show_bug.cgi?id=69637
+
+        Reviewed by Darin Adler.
+
+        * fast/filesystem/filesystem-no-callback-null-ptr-crash.html: fix now-broken logic testing for unrelated bug
+        * fast/filesystem/not-enough-arguments-expected.txt: 
+        * fast/filesystem/not-enough-arguments.html: add checks for webkitRequestFileSystem with not enough parameters
+
 2011-12-07  James Simonsen  <[email protected]>
 
         [Chromium] Unreviewed, rebaseline width-overflow.html and fix test_expectations.txt

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


--- trunk/LayoutTests/fast/filesystem/filesystem-no-callback-null-ptr-crash.html	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/LayoutTests/fast/filesystem/filesystem-no-callback-null-ptr-crash.html	2011-12-08 03:55:33 UTC (rev 102305)
@@ -7,9 +7,13 @@
   if (window.layoutTestController)
       layoutTestController.dumpAsText();
   if (window.webkitRequestFileSystem) {
-      // These two calls should not cause a NULL pointer crash:
-      webkitRequestFileSystem(TEMPORARY, 100);
+      // These two calls should throw an exception but should NOT cause a NULL pointer crash:
       webkitResolveLocalFileSystemURL('');
-      document.getElementById('log').innerHTML = "PASS";
+      try {
+          webkitRequestFileSystem(TEMPORARY, 100);
+      }
+      catch(e) {
+          document.getElementById('log').innerHTML = "PASS";
+      }
   }
 </script>

Modified: trunk/LayoutTests/fast/filesystem/not-enough-arguments-expected.txt (102304 => 102305)


--- trunk/LayoutTests/fast/filesystem/not-enough-arguments-expected.txt	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/LayoutTests/fast/filesystem/not-enough-arguments-expected.txt	2011-12-08 03:55:33 UTC (rev 102305)
@@ -4,6 +4,9 @@
 
 
 PASS webkitResolveLocalFileSystemURL() threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem() threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem(PERSISTENT) threw exception TypeError: Not enough arguments.
+PASS webkitRequestFileSystem(PERSISTENT, 100) threw exception TypeError: Not enough arguments.
 Successfully obtained Persistent FileSystem:file__0:Temporary
 PASS fileSystem.root.removeRecursively() threw exception TypeError: Not enough arguments.
 PASS fileSystem.root.moveTo() threw exception TypeError: Not enough arguments.

Modified: trunk/LayoutTests/fast/filesystem/not-enough-arguments.html (102304 => 102305)


--- trunk/LayoutTests/fast/filesystem/not-enough-arguments.html	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/LayoutTests/fast/filesystem/not-enough-arguments.html	2011-12-08 03:55:33 UTC (rev 102305)
@@ -48,6 +48,9 @@
 
 if (window.webkitRequestFileSystem) {
     shouldThrow("webkitResolveLocalFileSystemURL()");
+    shouldThrow("webkitRequestFileSystem()");
+    shouldThrow("webkitRequestFileSystem(PERSISTENT)");
+    shouldThrow("webkitRequestFileSystem(PERSISTENT, 100)");
     webkitRequestFileSystem(window.TEMPORARY, 100, successCallback, errorCallback);
     window.jsTestIsAsync = true;
 } else

Modified: trunk/Source/WebCore/ChangeLog (102304 => 102305)


--- trunk/Source/WebCore/ChangeLog	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/Source/WebCore/ChangeLog	2011-12-08 03:55:33 UTC (rev 102305)
@@ -1,3 +1,12 @@
+2011-12-07  Mark Pilgrim  <[email protected]>
+
+        [FileSystem API] requestFileSystem successCallback is required
+        https://bugs.webkit.org/show_bug.cgi?id=69637
+
+        Reviewed by Darin Adler.
+
+        * page/DOMWindow.idl: remove [Optional] flag from successCallback parameter
+
 2011-12-07  Leo Yang  <[email protected]>
 
         Upstream the BlackBerry porting of network Resource

Modified: trunk/Source/WebCore/page/DOMWindow.idl (102304 => 102305)


--- trunk/Source/WebCore/page/DOMWindow.idl	2011-12-08 03:43:46 UTC (rev 102304)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2011-12-08 03:55:33 UTC (rev 102305)
@@ -193,7 +193,7 @@
 #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
         const unsigned short TEMPORARY = 0;
         const unsigned short PERSISTENT = 1;
-        [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(in unsigned short type, in long long size, in [Callback, Optional] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
+        [EnabledAtRuntime=FileSystem] void webkitRequestFileSystem(in unsigned short type, in long long size, in [Callback] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
         [EnabledAtRuntime=FileSystem] void webkitResolveLocalFileSystemURL(in DOMString url, in [Callback, Optional] EntryCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
 
         attribute [EnabledAtRuntime=FileSystem] WebKitFlagsConstructor WebKitFlags;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to