mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Correct and improve addEventListener.html.
We do now fire (trusted) events for onerror.
This commit is contained in:
parent
ae38c53de7
commit
ac111b96fd
2 changed files with 2 additions and 7 deletions
|
@ -1,5 +0,0 @@
|
||||||
[addEventListener.html]
|
|
||||||
type: testharness
|
|
||||||
[window.onerror - addEventListener]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue