…m` for unspecified Blob type (
servo#44897)
We didn't produce valid RFC2397 format. Earlier, when Blob type is
empty, we would produce
`data:base64,...`, but the correct format should be `data:;base64,...`
However, just doing that won't pass the test, as spec is not aligned
with browser behaviours.
All browsers follow the existing tests behaviour.
I opened
w3c/FileAPI#220.
Testing: Passing `reading-data-section/filereader_readAsDataURL.any.js`
for worker and main window.
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
While implementing FileAPI in Servo, servo/servo#44897
I notice we fail to pass some readAsDataURL WPT tests:
It seems that spec is not aligned with test expectations. WebKit, Chromium, Gecko would fallback to application/octet-stream.
Part of #104
Implementation commitment:
And Servo will do this from now on.
Preview | Diff