Revision 614c1ccac5f885e58444fe74a2aedd120d2ca73f authored by Marcos Cáceres on 21 August 2018, 05:04:44 UTC, committed by GitHub on 21 August 2018, 05:04:44 UTC
1 parent 4797b9c
Worker_dispatchEvent_ErrorEvent.htm
<!DOCTYPE html>
<title> ErrorEvent and Worker.dispatchEvent() </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
async_test(function(t) {
var event = "error";
var filename = './support/ErrorEvent.js';
var message = 'Hello Worker';
var lineno = 5;
var colno = 6;
var error = new Error("test");
var worker = new Worker(filename);
worker.addEventListener(event, t.step_func_done(function(e) {
assert_equals(e.type, event, 'type');
assert_equals(e.message, message, 'message');
assert_equals(e.filename, filename, 'filename');
assert_equals(e.lineno, lineno, 'lineno');
assert_equals(e.colno, colno, 'colno');
assert_equals(e.error, error, 'error');
}), true);
var e = new ErrorEvent(event, {bubbles:true, cancelable:true, message:message, filename:filename, lineno:lineno, colno:colno, error:error});
worker.dispatchEvent(e);
});
test(function() {
var e = new ErrorEvent("error");
assert_false("initErrorEvent" in e, "should not be supported");
}, "initErrorEvent");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...