Correct and improve addEventListener.html.

We do now fire (trusted) events for onerror.
This commit is contained in:
Ms2ger 2016-09-01 16:05:13 +02:00
parent ae38c53de7
commit ac111b96fd
2 changed files with 2 additions and 7 deletions

View file

@ -1,5 +0,0 @@
[addEventListener.html]
type: testharness
[window.onerror - addEventListener]
expected: FAIL

View file

@ -11,9 +11,9 @@
setup({allow_uncaught_exception:true}); setup({allow_uncaught_exception:true});
var t = async_test(); var t = async_test();
var ran = false; var ran = false;
// spec doesn't say to fire an event so this should do nothing
window.addEventListener('error', t.step_func(function(e){ window.addEventListener('error', t.step_func(function(e){
ran = true; ran = true;
assert_true(e.isTrusted, 'isTrusted');
}), false); }), false);
</script> </script>
<script> <script>
@ -24,7 +24,7 @@
</script> </script>
<script> <script>
t.step(function(){ t.step(function(){
assert_false(ran, 'ran'); assert_true(ran, 'ran');
t.done(); t.done();
}); });
</script> </script>