| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <div> | 4 <div> |
| 5 This test passes if it does not trip an assert in debug builds. | 5 This test passes if it does not trip an assert in debug builds. |
| 6 It ensures a readystatechange event can't get dispatched until after a plugin is
fully removed. | 6 It ensures a readystatechange event can't get dispatched until after a plugin is
fully removed. |
| 7 </div> | 7 </div> |
| 8 <embed id="viewer" src="resources/simple_blank.swf"></embed> | 8 <embed id="viewer" src="resources/simple_blank.swf"></embed> |
| 9 <script> | 9 <script> |
| 10 if (window.testRunner) | 10 if (window.testRunner) |
| 11 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
| 12 | 12 |
| 13 var i = 0; | 13 var i = 0; |
| 14 document.addEventListener('readystatechange', function() { | 14 document.addEventListener('readystatechange', function() { |
| 15 if (i == 1) { | 15 if (i == 1) { |
| 16 try { | 16 try { |
| 17 document.body.appendChild(document.getElementById('viewer')); | 17 document.body.appendChild(document.getElementById('viewer')); |
| 18 } | 18 } |
| 19 catch (e) { | 19 catch (e) { |
| 20 alert('PASS: element could not be re-appended'); | 20 alert('PASS: element could not be re-appended'); |
| 21 } | 21 } |
| 22 } | 22 } |
| 23 i++; | 23 i++; |
| 24 }); | 24 }); |
| 25 | 25 |
| 26 window.addEventListener('DOMContentLoaded', function() { | 26 window.addEventListener('DOMContentLoaded', function() { |
| 27 document.body.removeChild(document.getElementById('viewer')); | 27 document.body.removeChild(document.getElementById('viewer')); |
| 28 }); | 28 }); |
| 29 |
| 30 // FIXME: This shouldn't be needed, but it's here to make our whitespace text no
de |
| 31 // creation deterministic in the face of lazily creating the render tree. |
| 32 document.body.offsetHeight; |
| 29 </script> | 33 </script> |
| 30 </body> | 34 </body> |
| 31 </html> | 35 </html> |
| OLD | NEW |