https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 3bdde552d689cf4fabdddfe24d0834d8bb4eeb36 authored by James Graham on 10 April 2018, 19:20:13 UTC
Add reftest selftests to the infrastructure directory
Tip revision: 3bdde55
Blob-in-worker.worker.js
importScripts("/resources/testharness.js");

async_test(function() {
  var data = "TEST";
  var blob = new Blob([data], {type: "text/plain"});
  var reader = new FileReader();
  reader.onload = this.step_func_done(function() {
    assert_equals(reader.result, data);
  });
  reader.onerror = this.unreached_func("Unexpected error event");
  reader.readAsText(blob);
}, "Create Blob in Worker");

done();
back to top