Added exception-handling to worker wpt tests.

This commit is contained in:
Alan Jeffrey 2017-06-22 11:28:58 -05:00
parent 7d785e75cd
commit 030e01c1d1
5 changed files with 9 additions and 6 deletions

View file

@ -25,7 +25,9 @@ function assert_worker_construction_fails(test_desc, mime_type, worker_code) {
w.onmessage = t.step_func_done(function(e) {
assert_unreached('Should not receive any message back.');
});
w.onerror = t.step_func_done(function() {
w.onerror = t.step_func_done(function(e) {
// Stop the error from being propagated to the WPT test harness
e.preventDefault();
});
}, test_desc);
}