1 <script src=video-test.js></script>
2 <video poster="content/abe.png">
3 <source src="content/bogus" type="bogus">
8 function listenForWidthAndHeight(expectedWidth, expectedHeight, callback) {
9 if (video.clientWidth == expectedWidth && video.clientHeight == expectedHeight) {
12 // This uses a 20ms sleep loop to accomplish the wait, since the
13 // standard specifies no events that fire on poster load or error.
14 window.setTimeout(listenForWidthAndHeight, 20, expectedWidth, expectedHeight, callback);
19 testExpected("video.clientWidth", 76);
20 testExpected("video.clientHeight", 103);
25 waitForEvent("loadstart", function () {
26 listenForWidthAndHeight(76, 103, expected);