Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: LayoutTests/platform/chromium/compositing/video-frame-size-change.html

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body onload="load()">
4 <p>Tests decoding and rendering a video element that has a changing reso lution.</p>
5 <video width=320></video>
6 <video width=320></video>
7 <script>
8 if (window.testRunner) {
9 testRunner.waitUntilDone();
10 }
11
12 function load() {
13 var canplayCount = 0;
14 function oncanplay() {
15 if (++canplayCount < 2) {
16 return;
17 }
18 // Make sure we render the first frame.
19 if (window.testRunner) {
20 testRunner.display();
21 }
22 video.play();
23 };
24
25 // Get the first video to stay on frame zero for comparison purp oses.
26 var video = document.getElementsByTagName("video")[0];
27 video.src = "../media/resources/frame_size_change.webm";
28 video.addEventListener('canplay', oncanplay);
29
30 // Get the second video to play through the clip with changing d imensions.
31 video = document.getElementsByTagName("video")[1];
32 video.src = "../media/resources/frame_size_change.webm";
33 video.addEventListener('canplay', oncanplay);
34
35 video.addEventListener('playing', function() {
36 // Make sure the video plays for a bit.
37 video.addEventListener('timeupdate', function() {
38 if (video.currentTime > 1.0) {
39 video.pause();
40 }
41 });
42 });
43
44 video.addEventListener('pause', function() {
45 // Now seek back to a point where resolution should be diffe rent.
46 video.addEventListener('seeked', function() {
47 if (window.testRunner) {
48 testRunner.notifyDone();
49 }
50 });
51
52 video.currentTime = 0.5;
53 });
54 }
55 </script>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698