| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| if (window.internals) { |
| var default_poster = 'content/greenbox.png'; |
| window.internals.settings.setDefaultVideoPosterURL(default_poster); |
| addEventListener("load", function() { |
| var poster = window.internals.getImageSourceURL(document.getElementById("video-no-poster")); |
| if (poster) { |
| if (poster == default_poster) |
| document.getElementById("result-no-poster").innerText = "PASS"; |
| else |
| document.getElementById("result-no-poster").innerText = "FAIL"; |
| } else |
| document.getElementById("result-no-poster").innerText = "FAIL: image source is null"; |
| |
| poster = window.internals.getImageSourceURL(document.getElementById("video-has-poster")); |
| if (poster) { |
| if (poster == "content/abe.png") |
| document.getElementById("result-has-poster").innerText = "PASS"; |
| else |
| document.getElementById("result-has-poster").innerText = "FAIL: poster was changed"; |
| } else |
| document.getElementById("result-has-poster").innerText = "FAIL: image source is null"; |
| |
| poster = window.internals.getImageSourceURL(document.getElementById("video-has-empty-poster")); |
| if (poster) { |
| if (poster == default_poster) |
| document.getElementById("result-has-empty-poster").innerText = "PASS"; |
| else |
| document.getElementById("result-has-empty-poster").innerText = "FAIL"; |
| } else |
| document.getElementById("result-has-empty-poster").innerText = "FAIL: image source is null"; |
| |
| testRunner.notifyDone(); |
| }, false); |
| } |
| |
| </script> |
| </head> |
| <body> |
| <pre id="result-no-poster"></pre> |
| <pre id="result-has-poster"></pre> |
| <pre id="result-has-empty-poster"></pre> |
| <video id="video-no-poster" src="content/test.mp4" preload="none" /> |
| <video id="video-has-poster" src="content/test.mp4" poster="content/abe.png" preload="none" /> |
| <video id="video-has-empty-poster" src="content/test.mp4" poster="" preload="none" /> |
| </body> |
| </html> |