OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <title>pointer updates (removing source elements)</title> |
| 3 <script src="../../../../../../../resources/testharness.js"></script> |
| 4 <script src="../../../../../../../resources/testharnessreport.js"></script> |
| 5 <div id=log></div> |
| 6 <script> |
| 7 var a = 0; |
| 8 var b = 0; |
| 9 var c = 0; |
| 10 var x1 = 0; |
| 11 var x2 = 0; |
| 12 var x3 = 0; |
| 13 var x4 = 0; |
| 14 </script> |
| 15 <video |
| 16 ><source onerror=x1++ |
| 17 ><source onerror=a++ |
| 18 ><source onerror=x2++ |
| 19 ><source onerror=b++ src='resources/delayed-broken-video.py' |
| 20 ><source onerror=x3++ |
| 21 ><source onerror=c++ |
| 22 ><source onerror=x4++ |
| 23 ></video> |
| 24 <script> |
| 25 async_test(function(t) { |
| 26 var video = document.querySelector('video'); |
| 27 // remove the xn elements |
| 28 [].forEach.call(document.querySelectorAll('[onerror^="x"]'), function(elm) { |
| 29 video.removeChild(elm); |
| 30 }); |
| 31 window.onload = t.step_func(function() { |
| 32 assert_equals(a, 1, 'error events on a'); |
| 33 assert_equals(b, 1, 'error events on b'); |
| 34 assert_equals(c, 1, 'error events on c'); |
| 35 assert_equals(x1, 1, 'error events on x1'); |
| 36 assert_equals(x2, 1, 'error events on x2'); |
| 37 assert_equals(x3, 0, 'error events on x3'); |
| 38 assert_equals(x4, 0, 'error events on x4'); |
| 39 t.done(); |
| 40 }); |
| 41 }); |
| 42 </script> |
OLD | NEW |