Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / video-frame-size-change.html
blob801a33b99bf5b9c4f4aa97354ad909e39bd1ebf5
1 <!DOCTYPE html>
2 <html>
3 <body onload="load()">
4 <p>Tests decoding and rendering a video element that has a changing resolution.</p>
5 <video width=320></video>
6 <video width=320></video>
7 <script>
8 if (window.testRunner) {
9 testRunner.waitUntilDone();
12 function load() {
13 var canplayCount = 0;
14 function oncanplay() {
15 if (++canplayCount < 2) {
16 return;
18 // Make sure we render the first frame.
19 requestAnimationFrame(function() {
20 video.play();
21 });
24 // Get the first video to stay on frame zero for comparison purposes.
25 var video = document.getElementsByTagName("video")[0];
26 video.src = "../media/resources/frame_size_change.webm";
27 video.addEventListener('canplay', oncanplay);
29 // Get the second video to play through the clip with changing dimensions.
30 video = document.getElementsByTagName("video")[1];
31 video.src = "../media/resources/frame_size_change.webm";
32 video.addEventListener('canplay', oncanplay);
34 video.addEventListener('playing', function() {
35 // Make sure the video plays for a bit.
36 video.addEventListener('timeupdate', function() {
37 if (video.currentTime > 1.0) {
38 video.pause();
40 });
41 });
43 video.addEventListener('pause', function() {
44 // Now seek back to a point where resolution should be different.
45 video.addEventListener('seeked', function() {
46 if (window.testRunner) {
47 testRunner.notifyDone();
49 });
51 video.currentTime = 0.5;
52 });
54 </script>
55 </body>
56 </html>