Changeset 100296 in webkit
- Timestamp:
- Nov 15, 2011 11:14:53 AM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r100292 r100296 1 2011-11-15 Anna Cavender <annacc@chromium.org> 2 3 Change layout tests for cuechange, enter, and exit events to check the order 4 rather than the timing of the events (since actual timing can not be guaranteed). 5 https://bugs.webkit.org/show_bug.cgi?id=72269 6 7 Reviewed by Tony Gentilcore. 8 9 * media/track/track-cues-cuechange-expected.txt: 10 * media/track/track-cues-cuechange.html: 11 * media/track/track-cues-enter-exit-expected.txt: 12 * media/track/track-cues-enter-exit.html: 13 * platform/chromium/test_expectations.txt: 14 1 15 2011-11-15 Tony Chang <tony@chromium.org> 2 16 -
trunk/LayoutTests/media/track/track-cues-cuechange-expected.txt
r100064 r100296 1 Tests that TextTrack's cues are indexed and updated within 500ms during video playback. Test uses the cuechange event. 2 3 This test may fail occasionally since we cannot guarantee that cue events will fire within 250ms of their startTime or endTime. 1 Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the cuechange event. 4 2 5 3 EVENT(canplaythrough) … … 8 6 9 7 EVENT(cuechange) from TextTrack 8 Cue entered 10 9 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 11 Start time: 12 EXPECTED (video.currentTime >= '1') OK 13 EXPECTED (video.currentTime < '1.5') OK 10 EXPECTED (currentCue.id == '1') OK 14 11 15 12 EVENT(cuechange) from <track> 13 Cue entered 16 14 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 17 Start time: 18 EXPECTED (video.currentTime >= '1') OK 19 EXPECTED (video.currentTime < '1.5') OK 15 EXPECTED (currentCue.id == '1') OK 20 16 21 17 EVENT(cuechange) from TextTrack 22 End time: 23 EXPECTED (video.currentTime >= '2') OK 24 EXPECTED (video.currentTime < '2.5') OK 18 Cue exited 25 19 26 20 EVENT(cuechange) from <track> 27 End time: 28 EXPECTED (video.currentTime >= '2') OK 29 EXPECTED (video.currentTime < '2.5') OK 21 Cue exited 30 22 31 23 EVENT(cuechange) from TextTrack 24 Cue entered 32 25 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 33 Start time: 34 EXPECTED (video.currentTime >= '2.5') OK 35 EXPECTED (video.currentTime < '3') OK 26 EXPECTED (currentCue.id == '2') OK 36 27 37 28 EVENT(cuechange) from <track> 29 Cue entered 38 30 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 39 Start time: 40 EXPECTED (video.currentTime >= '2.5') OK 41 EXPECTED (video.currentTime < '3') OK 31 EXPECTED (currentCue.id == '2') OK 42 32 43 33 EVENT(cuechange) from TextTrack 44 End time: 45 EXPECTED (video.currentTime >= '3.5') OK 46 EXPECTED (video.currentTime < '4') OK 34 Cue exited 47 35 48 36 EVENT(cuechange) from <track> 49 End time: 50 EXPECTED (video.currentTime >= '3.5') OK 51 EXPECTED (video.currentTime < '4') OK 37 Cue exited 52 38 53 39 EVENT(cuechange) from TextTrack 40 Cue entered 54 41 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 55 Start time: 56 EXPECTED (video.currentTime >= '4') OK 57 EXPECTED (video.currentTime < '4.5') OK 42 EXPECTED (currentCue.id == '3') OK 58 43 59 44 EVENT(cuechange) from <track> 45 Cue entered 60 46 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 61 Start time: 62 EXPECTED (video.currentTime >= '4') OK 63 EXPECTED (video.currentTime < '4.5') OK 47 EXPECTED (currentCue.id == '3') OK 64 48 65 49 EVENT(cuechange) from TextTrack 66 End time: 67 EXPECTED (video.currentTime >= '5') OK 68 EXPECTED (video.currentTime < '5.5') OK 50 Cue exited 69 51 70 52 EVENT(cuechange) from <track> 71 End time: 72 EXPECTED (video.currentTime >= '5') OK 73 EXPECTED (video.currentTime < '5.5') OK 53 Cue exited 74 54 75 55 END OF TEST -
trunk/LayoutTests/media/track/track-cues-cuechange.html
r100064 r100296 8 8 </head> 9 9 <body> 10 <p>Tests that TextTrack's cues are indexed and updated within 500ms during video playback. Test uses the cuechange event.</p> 11 <p>This test may fail occasionally since we cannot guarantee that cue events will fire within 250ms of their startTime or endTime.</p> 10 <p>Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the cuechange event.</p> 12 11 <video controls> 13 12 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" kind="captions"> … … 15 14 <script> 16 15 17 var timeInterval = 0.5;18 16 var cueChangeCount = 0; 17 var currentCue; 19 18 var testTrack; 20 19 … … 22 21 { 23 22 consoleWrite("EVENT(cuechange) from <track>"); 23 24 currentCueIndex = Math.floor(cueChangeCount/2); 25 currentCue = event.target.track.cues[currentCueIndex]; 24 26 checkCue(); 25 27 … … 32 34 { 33 35 consoleWrite("EVENT(cuechange) from TextTrack"); 36 37 currentCueIndex = Math.floor(cueChangeCount/2); 38 currentCue = event.target.cues[currentCueIndex]; 34 39 checkCue(); 35 40 } … … 37 42 function checkCue() 38 43 { 39 var cues = testTrack.track.cues;40 41 var currentCue = cues[Math.floor(cueChangeCount/2)];42 43 44 if (cueChangeCount % 2 == 0) { 45 consoleWrite("Cue entered"); 44 46 testExpected(currentCue, testTrack.track.activeCues[0]); 45 consoleWrite("Start time:"); 46 testExpected("video.currentTime", currentCue.startTime, '>='); 47 testExpected("video.currentTime", currentCue.startTime + timeInterval, '<'); 48 } else { 49 consoleWrite("End time:"); 50 testExpected("video.currentTime", currentCue.endTime, '>='); 51 testExpected("video.currentTime", currentCue.endTime + timeInterval, '<'); 52 } 47 testExpected("currentCue.id", currentCueIndex + 1); 48 } else 49 consoleWrite("Cue exited"); 53 50 consoleWrite(""); 54 51 } -
trunk/LayoutTests/media/track/track-cues-enter-exit-expected.txt
r100064 r100296 1 Tests that TextTrack's cues are indexed and updated within 500ms during video playback. Test uses the enter and exits events on TextTrackCue. 2 3 This test may fail occasionally since we cannot guarantee that cue events will fire within 250ms of their startTime or endTime. 1 Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the enter and exits events on TextTrackCue. 4 2 5 3 EVENT(canplaythrough) … … 10 8 This cue is the currently active cue: 11 9 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 12 Start time: 13 EXPECTED (video.currentTime >= '1') OK 14 EXPECTED (video.currentTime < '1.5') OK 10 EXPECTED (currentCue.id == '1') OK 15 11 16 12 EVENT(exit) 17 End time:18 EXPECTED (video.currentTime >= '2') OK19 EXPECTED (video.currentTime < '2.5') OK20 13 21 14 EVENT(enter) 22 15 This cue is the currently active cue: 23 16 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 24 Start time: 25 EXPECTED (video.currentTime >= '2.5') OK 26 EXPECTED (video.currentTime < '3') OK 17 EXPECTED (currentCue.id == '2') OK 27 18 28 19 EVENT(exit) 29 End time:30 EXPECTED (video.currentTime >= '3.5') OK31 EXPECTED (video.currentTime < '4') OK32 20 33 21 EVENT(enter) 34 22 This cue is the currently active cue: 35 23 EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK 36 Start time: 37 EXPECTED (video.currentTime >= '4') OK 38 EXPECTED (video.currentTime < '4.5') OK 24 EXPECTED (currentCue.id == '3') OK 39 25 40 26 EVENT(exit) 41 End time:42 EXPECTED (video.currentTime >= '5') OK43 EXPECTED (video.currentTime < '5.5') OK44 27 45 28 END OF TEST -
trunk/LayoutTests/media/track/track-cues-enter-exit.html
r100064 r100296 8 8 </head> 9 9 <body> 10 <p>Tests that TextTrack's cues are indexed and updated within 500ms during video playback. Test uses the enter and exits events on TextTrackCue.</p> 11 <p>This test may fail occasionally since we cannot guarantee that cue events will fire within 250ms of their startTime or endTime.</p> 10 <p>Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the enter and exits events on TextTrackCue.</p> 12 11 <video controls> 13 12 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" kind="captions"> 14 13 </video> 15 14 <script> 16 17 var timeInterval = 0.5 15 18 16 var cueCount = 0; 17 var currentCue; 19 18 var testTrack; 20 19 … … 23 22 consoleWrite("EVENT(enter)"); 24 23 25 var currentCue = testTrack.track.cues[cueCount];24 currentCue = event.target; 26 25 27 26 consoleWrite("This cue is the currently active cue:"); 28 27 testExpected(currentCue, testTrack.track.activeCues[0]); 29 consoleWrite("Start time:"); 30 testExpected("video.currentTime", currentCue.startTime, '>='); 31 testExpected("video.currentTime", currentCue.startTime + timeInterval, '<'); 28 testExpected("currentCue.id", cueCount + 1); 32 29 consoleWrite(""); 33 30 } … … 36 33 { 37 34 consoleWrite("EVENT(exit)"); 38 39 var currentCue = testTrack.track.cues[cueCount];40 41 consoleWrite("End time:");42 testExpected("video.currentTime", currentCue.endTime, '>=');43 testExpected("video.currentTime", currentCue.endTime + timeInterval, '<');44 35 consoleWrite(""); 45 36 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r100292 r100296 3880 3880 3881 3881 BUGWK72149 : media/track/tracklist-is-reachable.html = TEXT 3882 BUGWK72269 : media/track/track-cues-cuechange.html = PASS TEXT3883 3882 3884 3883 BUGV8_1821 WIN LINUX : http/tests/inspector-enabled/dedicated-workers-list.html = PASS CRASH
Note: See TracChangeset
for help on using the changeset viewer.