Revision 6534d852f8bcef689ffa4023325c8cbaa71cdf9c authored by Luke Bjerring on 14 March 2018, 15:55:18 UTC, committed by Philip Jägenstedt on 14 March 2018, 15:55:18 UTC
1 parent 7d1bf74
FileReaderSync.worker.js
importScripts("/resources/testharness.js");
var blob, readerSync;
setup(function() {
readerSync = new FileReaderSync();
blob = new Blob(["test"]);
});
test(function() {
assert_true(readerSync instanceof FileReaderSync);
}, "Interface");
test(function() {
var text = readerSync.readAsText(blob);
assert_equals(text, "test");
}, "readAsText");
test(function() {
var data = readerSync.readAsDataURL(blob);
assert_equals(data.indexOf("data:"), 0);
}, "readAsDataURL");
test(function() {
var data = readerSync.readAsArrayBuffer(blob);
assert_true(data instanceof ArrayBuffer);
}, "readAsArrayBuffer");
done();
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...