From e9ac111d02b80a220edd4d061417b8b7faf01a84 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Mon, 5 Jun 2023 15:44:00 -0400 Subject: [PATCH] test: update FileAPI web-platform tests PR-URL: https://github.com/nodejs/node/pull/48322 Reviewed-By: Antoine du Hamel Reviewed-By: Filip Skokan Reviewed-By: Luigi Pinca --- .../filereader_readAsDataURL.html | 14 +++++++++++++- test/fixtures/wpt/README.md | 2 +- test/fixtures/wpt/versions.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.html b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.html index 5bc39499a229d1..9254f7d1535bad 100644 --- a/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.html +++ b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.html @@ -48,4 +48,16 @@ reader.readAsDataURL(blob); }, 'readAsDataURL result for Blob with unspecified MIME type'); - \ No newline at end of file +async_test(function(testCase) { + var blob = new Blob([]); + var reader = new FileReader(); + + reader.onload = this.step_func(function() { + assert_equals(reader.result, + "data:application/octet-stream;base64,"); + testCase.done(); + }); + reader.readAsDataURL(blob); +}, 'readAsDataURL result for empty Blob'); + + diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index cf75d8cf184ee8..634057b123936f 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -16,7 +16,7 @@ Last update: - dom/events: https://github.com/web-platform-tests/wpt/tree/ab8999891c/dom/events - encoding: https://github.com/web-platform-tests/wpt/tree/0c1b9d1622/encoding - fetch/data-urls/resources: https://github.com/web-platform-tests/wpt/tree/7c79d998ff/fetch/data-urls/resources -- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI +- FileAPI: https://github.com/web-platform-tests/wpt/tree/e36dbb6f00/FileAPI - FileAPI/file: https://github.com/web-platform-tests/wpt/tree/c01f637cca/FileAPI/file - hr-time: https://github.com/web-platform-tests/wpt/tree/34cafd797e/hr-time - html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 5ffa879207c1bf..90090e8d4ba230 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -24,7 +24,7 @@ "path": "fetch/data-urls/resources" }, "FileAPI": { - "commit": "3b279420d40afea32506e823f9ac005448f4f3d8", + "commit": "e36dbb6f00fb59f9fc792f509194432e9e6d0b6d", "path": "FileAPI" }, "FileAPI/file": {