OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>This page tests that you can correctly clear a video object's poster attribut
e in a beforeload listener without causing a crash.</p> | 4 <p>This page tests that you can correctly clear a video object's poster attribut
e in a beforeload listener without causing a crash.</p> |
5 <div id="console">FAIL: test didn't run to completion.</div> | 5 <div id="console">FAIL: test didn't run to completion.</div> |
6 <script> | 6 <script> |
7 if (window.testRunner) { | 7 if (window.testRunner) { |
8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
9 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
10 } | 10 } |
11 x = document.createElement('video'); | 11 x = document.createElement('video'); |
12 x.addEventListener('beforeload', function () { | 12 x.addEventListener('beforeload', function () { |
13 x.removeAttribute('poster'); | 13 x.removeAttribute('poster'); |
14 document.getElementById('console').textContent = 'PASS: test completed.'; | 14 document.getElementById('console').textContent = 'PASS: test completed.'; |
15 if (window.testRunner) | 15 if (window.testRunner) |
16 testRunner.notifyDone(); | 16 testRunner.notifyDone(); |
17 }, false); | 17 }, false); |
18 x.poster = 'foobar'; | 18 x.poster = 'foobar'; |
19 </script> | 19 </script> |
20 </body> | 20 </body> |
21 </html> | 21 </html> |
OLD | NEW |