| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
| 3 <script> | 3 <script> |
| 4 window.jsTestIsAsync = true; | 4 window.jsTestIsAsync = true; |
| 5 | 5 |
| 6 description('Test that MutationObservers created during delivery must wait for t
he next loop.'); | 6 description('Test that MutationObservers created during delivery must wait for t
he next loop.'); |
| 7 function finish() { | 7 function finish() { |
| 8 shouldBe('order.length', '4'); | 8 shouldBe('order.length', '4'); |
| 9 shouldBe('order[0]', '1'); | 9 shouldBe('order[0]', '1'); |
| 10 shouldBe('order[1]', '2'); | 10 shouldBe('order[1]', '2'); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 }); | 29 }); |
| 30 var observer2 = new MutationObserver(function(mutations) { | 30 var observer2 = new MutationObserver(function(mutations) { |
| 31 order.push(2); | 31 order.push(2); |
| 32 }); | 32 }); |
| 33 | 33 |
| 34 observer1.observe(div, {attributes: true}); | 34 observer1.observe(div, {attributes: true}); |
| 35 observer2.observe(div, {attributes: true}); | 35 observer2.observe(div, {attributes: true}); |
| 36 div.setAttribute('foo', 'bar'); | 36 div.setAttribute('foo', 'bar'); |
| 37 setTimeout(finish, 0); | 37 setTimeout(finish, 0); |
| 38 </script> | 38 </script> |
| 39 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |