| <!DOCTYPE html> |
| <title>Test that media dimensions are equal to poster dimensions when "src" is invalid.</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <video poster="content/abe.png"></video> |
| <script> |
| async_test(function(t) { |
| var video = document.querySelector("video"); |
| |
| video.onloadstart = t.step_func(function () { |
| var image = document.createElement("img"); |
| image.src = "content/abe.png"; |
| // With this we can be reasonably sure that the poster is loaded. |
| image.onload = t.step_func_done(function() { |
| assert_equals(video.clientWidth, 76); |
| assert_equals(video.clientHeight, 103); |
| }); |
| }); |
| |
| video.src = "content/bogus"; |
| }); |
| </script> |