OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <title>pointer updates (removing source element after pointer)</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=a++ |
| 17 ><source onerror=b++ src='resources/delayed-broken-video.py' |
| 18 ><source onerror=x1++ |
| 19 ><source onerror=x2++ |
| 20 ><source onerror=x3++ |
| 21 ><source onerror=x4++ |
| 22 ><source onerror=c++ |
| 23 ></video> |
| 24 <script> |
| 25 var v; |
| 26 var t = async_test(function(t) { |
| 27 v = document.querySelector('video'); |
| 28 v.removeChild(document.querySelector('[onerror="x1++"]')); |
| 29 window.onload = t.step_func(function() { |
| 30 assert_equals(a, 1, 'error events on a'); |
| 31 assert_equals(b, 1, 'error events on b'); |
| 32 assert_equals(c, 1, 'error events on c'); |
| 33 assert_equals(x1, 0, 'error events on x1'); |
| 34 assert_equals(x2, 0, 'error events on x2'); |
| 35 assert_equals(x3, 0, 'error events on x3'); |
| 36 assert_equals(x4, 0, 'error events on x4'); |
| 37 t.done(); |
| 38 }); |
| 39 }); |
| 40 </script> |
| 41 <script> |
| 42 t.step(function() { |
| 43 v.removeChild(document.querySelector('[onerror="x2++"]')); |
| 44 }); |
| 45 </script> |
| 46 <script> |
| 47 t.step(function() { |
| 48 v.removeChild(document.querySelector('[onerror="x3++"]')); |
| 49 }); |
| 50 </script> |
| 51 <script> |
| 52 t.step(function() { |
| 53 v.removeChild(document.querySelector('[onerror="x4++"]')); |
| 54 }); |
| 55 </script> |
OLD | NEW |