| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This page tests that you can correctly clear a video object's poster attribute in a beforeload listener without causing a crash.</p> |
| <div id="console">FAIL: test didn't run to completion.</div> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| x = document.createElement('video'); |
| x.addEventListener('beforeload', function () { |
| x.removeAttribute('poster'); |
| document.getElementById('console').textContent = 'PASS: test completed.'; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, false); |
| x.poster = 'foobar'; |
| </script> |
| </body> |
| </html> |