https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 04f42da4f68238031149ae1d0daa8d5b074f3c22 authored by Boris Zbarsky on 04 April 2018, 17:30:07 UTC
Remove support for the 'type' parameter to document.open.
Tip revision: 04f42da
WorkerGlobalScope_ErrorEvent_filename.htm
<!DOCTYPE html>
<title> WorkerGlobalScope onerror event handler argument: location </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
// The worker events races with the window's load event; if the worker events
// arrive first, the harness will detect the error event and fail the test.
setup({ allow_uncaught_exception: true });

async_test(function(t) {
  var worker = new Worker('./support/ErrorEvent.js');
  worker.onmessage = t.step_func_done(function(e) {
    var href = location.href;
    var expected = href.substring(0, href.lastIndexOf('/')) + '/support/ErrorEvent.js';
    assert_equals(e.data.filename, expected);
  });
  worker.postMessage("Error Message");
});
</script>
back to top