Skip to content

Commit e9ac111

Browse files
anonrigruyadorno
authored andcommittedAug 29, 2023
test: update FileAPI web-platform tests
PR-URL: #48322 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4f74be3 commit e9ac111

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed
 

‎test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,16 @@
4848
reader.readAsDataURL(blob);
4949
}, 'readAsDataURL result for Blob with unspecified MIME type');
5050

51-
</script>
51+
async_test(function(testCase) {
52+
var blob = new Blob([]);
53+
var reader = new FileReader();
54+
55+
reader.onload = this.step_func(function() {
56+
assert_equals(reader.result,
57+
"data:application/octet-stream;base64,");
58+
testCase.done();
59+
});
60+
reader.readAsDataURL(blob);
61+
}, 'readAsDataURL result for empty Blob');
62+
63+
</script>

‎test/fixtures/wpt/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Last update:
1616
- dom/events: https://github.com/web-platform-tests/wpt/tree/ab8999891c/dom/events
1717
- encoding: https://github.com/web-platform-tests/wpt/tree/0c1b9d1622/encoding
1818
- fetch/data-urls/resources: https://github.com/web-platform-tests/wpt/tree/7c79d998ff/fetch/data-urls/resources
19-
- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI
19+
- FileAPI: https://github.com/web-platform-tests/wpt/tree/e36dbb6f00/FileAPI
2020
- FileAPI/file: https://github.com/web-platform-tests/wpt/tree/c01f637cca/FileAPI/file
2121
- hr-time: https://github.com/web-platform-tests/wpt/tree/34cafd797e/hr-time
2222
- html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob

‎test/fixtures/wpt/versions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"path": "fetch/data-urls/resources"
2525
},
2626
"FileAPI": {
27-
"commit": "3b279420d40afea32506e823f9ac005448f4f3d8",
27+
"commit": "e36dbb6f00fb59f9fc792f509194432e9e6d0b6d",
2828
"path": "FileAPI"
2929
},
3030
"FileAPI/file": {

0 commit comments

Comments
 (0)
Please sign in to comment.