Revision 105aa9b5f1a2cd3ab4f2d4cbf9db2cd9a0c7bd39 authored by jgraham on 28 March 2018, 19:03:58 UTC, committed by GitHub on 28 March 2018, 19:03:58 UTC
1 parent 167a1d6
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 ...