Title: [117160] trunk
- Revision
- 117160
- Author
- [email protected]
- Date
- 2012-05-15 14:27:39 -0700 (Tue, 15 May 2012)
Log Message
[File API] URL methods handling null arguments
https://bugs.webkit.org/show_bug.cgi?id=69693
Patch by Lauro Neto <[email protected]> on 2012-05-15
Reviewed by Adam Barth.
Source/WebCore:
Per the latest editor's draft of the File API:
http://dev.w3.org/2006/webapi/FileAPI/#dfn-createObjectURL
Use null instead of undefined as return value when a
null blob is given to URL.createObjectURL.
Test: fast/files/url-null.html
* html/DOMURL.idl:
LayoutTests:
URL.createObjectURL must return null instead of undefined
when a null blob is given as argument. Updated old test that
used undefined explicitly. New test by Mark Pilgrim (rebaselined
after fix).
* fast/files/url-null-expected.txt: Added.
* fast/files/url-null.html: Added.
* http/tests/fileapi/create-blob-url-from-data-url.html:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (117159 => 117160)
--- trunk/LayoutTests/ChangeLog 2012-05-15 21:21:22 UTC (rev 117159)
+++ trunk/LayoutTests/ChangeLog 2012-05-15 21:27:39 UTC (rev 117160)
@@ -1,3 +1,19 @@
+2012-05-15 Lauro Neto <[email protected]>
+
+ [File API] URL methods handling null arguments
+ https://bugs.webkit.org/show_bug.cgi?id=69693
+
+ Reviewed by Adam Barth.
+
+ URL.createObjectURL must return null instead of undefined
+ when a null blob is given as argument. Updated old test that
+ used undefined explicitly. New test by Mark Pilgrim (rebaselined
+ after fix).
+
+ * fast/files/url-null-expected.txt: Added.
+ * fast/files/url-null.html: Added.
+ * http/tests/fileapi/create-blob-url-from-data-url.html:
+
2012-05-15 Terry Anderson <[email protected]>
[chromium] Compute the best target node on a GestureTap event
Added: trunk/LayoutTests/fast/files/url-null-expected.txt (0 => 117160)
--- trunk/LayoutTests/fast/files/url-null-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/files/url-null-expected.txt 2012-05-15 21:27:39 UTC (rev 117160)
@@ -0,0 +1,10 @@
+Test URL methods with null arguments.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS webkitURL.createObjectURL(null) is null
+webkitURL.revokeObjectURL(null)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/files/url-null.html (0 => 117160)
--- trunk/LayoutTests/fast/files/url-null.html (rev 0)
+++ trunk/LayoutTests/fast/files/url-null.html 2012-05-15 21:27:39 UTC (rev 117160)
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <link rel="stylesheet" href=""
+ <script src=""
+ </head>
+ <body>
+ <div id="description"></div>
+ <div id="console"></div>
+<script>
+description("Test URL methods with null arguments.");
+
+shouldBe("webkitURL.createObjectURL(null)", "null");
+evalAndLog("webkitURL.revokeObjectURL(null)");
+var successfullyParsed = true;
+
+</script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html (117159 => 117160)
--- trunk/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html 2012-05-15 21:21:22 UTC (rev 117159)
+++ trunk/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html 2012-05-15 21:27:39 UTC (rev 117160)
@@ -15,7 +15,7 @@
if (!location.hash)
return;
var blobURL = location.hash.substr(1);
- if (blobURL == "undefined")
+ if (blobURL == "null")
log("PASS: no blob URL is created");
else
log("FAIL: created " + blobURL);
Modified: trunk/Source/WebCore/ChangeLog (117159 => 117160)
--- trunk/Source/WebCore/ChangeLog 2012-05-15 21:21:22 UTC (rev 117159)
+++ trunk/Source/WebCore/ChangeLog 2012-05-15 21:27:39 UTC (rev 117160)
@@ -1,3 +1,20 @@
+2012-05-15 Lauro Neto <[email protected]>
+
+ [File API] URL methods handling null arguments
+ https://bugs.webkit.org/show_bug.cgi?id=69693
+
+ Reviewed by Adam Barth.
+
+ Per the latest editor's draft of the File API:
+ http://dev.w3.org/2006/webapi/FileAPI/#dfn-createObjectURL
+
+ Use null instead of undefined as return value when a
+ null blob is given to URL.createObjectURL.
+
+ Test: fast/files/url-null.html
+
+ * html/DOMURL.idl:
+
2012-05-15 Jer Noble <[email protected]>
Unreviewed build fix [Qt].
Modified: trunk/Source/WebCore/html/DOMURL.idl (117159 => 117160)
--- trunk/Source/WebCore/html/DOMURL.idl 2012-05-15 21:21:22 UTC (rev 117159)
+++ trunk/Source/WebCore/html/DOMURL.idl 2012-05-15 21:27:39 UTC (rev 117160)
@@ -34,9 +34,9 @@
InterfaceName=URL
] DOMURL {
#if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
- [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in MediaStream stream);
+ [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in MediaStream stream);
#endif
- [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in Blob blob);
+ [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in Blob blob);
[CallWith=ScriptExecutionContext] static void revokeObjectURL(in DOMString url);
};
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes