Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-src-invalid-poster.html
blob1b6decb3c7ba580616719dfbcf6077f12b4acbef
1 <script src=video-test.js></script>
2 <video poster="content/abe.png">
3 <source src="content/bogus" type="bogus">
4 </video>
5 <script>
6 findMediaElement();
8 function listenForWidthAndHeight(expectedWidth, expectedHeight, callback) {
9 if (video.clientWidth == expectedWidth && video.clientHeight == expectedHeight) {
10 callback();
11 } else {
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);
18 function expected() {
19 testExpected("video.clientWidth", 76);
20 testExpected("video.clientHeight", 103);
21 endTest();
24 run("video.load()");
25 waitForEvent("loadstart", function () {
26 listenForWidthAndHeight(76, 103, expected);
27 });
28 </script>