https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 50873c90ca7681d02c9994de53b213a5b035d193 authored by rohilla21 on 16 March 2018, 19:04:14 UTC
armenian/css3-counter-styles-008.html: Removes range
Tip revision: 50873c9
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();
back to top