| <!DOCTYPE HTML5> |
| <title>Delayed load of poster should not overwrite intrinsic size of video.</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <video></video> |
| <script> |
| async_test(function(t) { |
| var video = document.querySelector("video"); |
| |
| video.onloadeddata = t.step_func(function() { |
| testVideoSize(); |
| video.poster = "content/abe.png"; |
| var image = document.createElement("img"); |
| image.src = "content/abe.png"; |
| image.onload = t.step_func_done(testVideoSize); |
| }); |
| |
| function testVideoSize() { |
| assert_equals(video.clientWidth, 320); |
| assert_equals(video.clientHeight, 240); |
| assert_equals(video.videoWidth, 320); |
| assert_equals(video.videoHeight, 240); |
| } |
| |
| video.src = "content/test.ogv"; |
| }); |
| </script> |