fune/testing/web-platform/tests/FileAPI/blob/Blob-in-worker.worker.js
Jimmy Wärting 5b32369ab2 Bug 1747905 [wpt PR 32209] - replace FileReader with .text(), a=testonly
Automatic update from web-platform-tests
FileAPI: replace FileReader with .text() (#32209)

Modernizes the test and makes it usable for implementations missing FileReader.
--

wpt-commits: 56d3f21a7772f742df8f6e04cb0fe2b067770056
wpt-pr: 32209
2022-01-11 14:12:20 +00:00

9 lines
230 B
JavaScript

importScripts("/resources/testharness.js");
promise_test(async () => {
const data = "TEST";
const blob = new Blob([data], {type: "text/plain"});
assert_equals(await blob.text(), data);
}, 'Create Blob in Worker');
done();