Changeset 100296 in webkit


Ignore:
Timestamp:
Nov 15, 2011 11:14:53 AM (12 years ago)
Author:
annacc@chromium.org
Message:

Change layout tests for cuechange, enter, and exit events to check the order
rather than the timing of the events (since actual timing can not be guaranteed).
https://bugs.webkit.org/show_bug.cgi?id=72269

Reviewed by Tony Gentilcore.

  • media/track/track-cues-cuechange-expected.txt:
  • media/track/track-cues-cuechange.html:
  • media/track/track-cues-enter-exit-expected.txt:
  • media/track/track-cues-enter-exit.html:
  • platform/chromium/test_expectations.txt:
Location:
trunk/LayoutTests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r100292 r100296  
     12011-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
    1152011-11-15  Tony Chang  <tony@chromium.org>
    216
  • 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.
     1Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the cuechange event.
    42
    53EVENT(canplaythrough)
     
    86
    97EVENT(cuechange) from TextTrack
     8Cue entered
    109EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    11 Start time:
    12 EXPECTED (video.currentTime >= '1') OK
    13 EXPECTED (video.currentTime < '1.5') OK
     10EXPECTED (currentCue.id == '1') OK
    1411
    1512EVENT(cuechange) from <track>
     13Cue entered
    1614EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    17 Start time:
    18 EXPECTED (video.currentTime >= '1') OK
    19 EXPECTED (video.currentTime < '1.5') OK
     15EXPECTED (currentCue.id == '1') OK
    2016
    2117EVENT(cuechange) from TextTrack
    22 End time:
    23 EXPECTED (video.currentTime >= '2') OK
    24 EXPECTED (video.currentTime < '2.5') OK
     18Cue exited
    2519
    2620EVENT(cuechange) from <track>
    27 End time:
    28 EXPECTED (video.currentTime >= '2') OK
    29 EXPECTED (video.currentTime < '2.5') OK
     21Cue exited
    3022
    3123EVENT(cuechange) from TextTrack
     24Cue entered
    3225EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    33 Start time:
    34 EXPECTED (video.currentTime >= '2.5') OK
    35 EXPECTED (video.currentTime < '3') OK
     26EXPECTED (currentCue.id == '2') OK
    3627
    3728EVENT(cuechange) from <track>
     29Cue entered
    3830EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    39 Start time:
    40 EXPECTED (video.currentTime >= '2.5') OK
    41 EXPECTED (video.currentTime < '3') OK
     31EXPECTED (currentCue.id == '2') OK
    4232
    4333EVENT(cuechange) from TextTrack
    44 End time:
    45 EXPECTED (video.currentTime >= '3.5') OK
    46 EXPECTED (video.currentTime < '4') OK
     34Cue exited
    4735
    4836EVENT(cuechange) from <track>
    49 End time:
    50 EXPECTED (video.currentTime >= '3.5') OK
    51 EXPECTED (video.currentTime < '4') OK
     37Cue exited
    5238
    5339EVENT(cuechange) from TextTrack
     40Cue entered
    5441EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    55 Start time:
    56 EXPECTED (video.currentTime >= '4') OK
    57 EXPECTED (video.currentTime < '4.5') OK
     42EXPECTED (currentCue.id == '3') OK
    5843
    5944EVENT(cuechange) from <track>
     45Cue entered
    6046EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    61 Start time:
    62 EXPECTED (video.currentTime >= '4') OK
    63 EXPECTED (video.currentTime < '4.5') OK
     47EXPECTED (currentCue.id == '3') OK
    6448
    6549EVENT(cuechange) from TextTrack
    66 End time:
    67 EXPECTED (video.currentTime >= '5') OK
    68 EXPECTED (video.currentTime < '5.5') OK
     50Cue exited
    6951
    7052EVENT(cuechange) from <track>
    71 End time:
    72 EXPECTED (video.currentTime >= '5') OK
    73 EXPECTED (video.currentTime < '5.5') OK
     53Cue exited
    7454
    7555END OF TEST
  • trunk/LayoutTests/media/track/track-cues-cuechange.html

    r100064 r100296  
    88    </head>
    99    <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>
    1211        <video controls>
    1312            <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" kind="captions">
     
    1514        <script>           
    1615
    17         var timeInterval = 0.5;
    1816        var cueChangeCount = 0;
     17        var currentCue;
    1918        var testTrack;
    2019
     
    2221        {
    2322            consoleWrite("EVENT(cuechange) from &lt;track&gt;");
     23           
     24            currentCueIndex = Math.floor(cueChangeCount/2);
     25            currentCue = event.target.track.cues[currentCueIndex];
    2426            checkCue();
    2527
     
    3234        {
    3335            consoleWrite("EVENT(cuechange) from TextTrack");
     36           
     37            currentCueIndex = Math.floor(cueChangeCount/2);
     38            currentCue = event.target.cues[currentCueIndex];
    3439            checkCue();
    3540        }
     
    3742        function checkCue()
    3843        {
    39             var cues = testTrack.track.cues;
    40            
    41             var currentCue = cues[Math.floor(cueChangeCount/2)];
    42 
    4344            if (cueChangeCount % 2 == 0) {
     45                consoleWrite("Cue entered");
    4446                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");
    5350            consoleWrite("");
    5451        }
  • 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.
     1Tests that TextTrack's cues are indexed and updated in order during video playback. Test uses the enter and exits events on TextTrackCue.
    42
    53EVENT(canplaythrough)
     
    108This cue is the currently active cue:
    119EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    12 Start time:
    13 EXPECTED (video.currentTime >= '1') OK
    14 EXPECTED (video.currentTime < '1.5') OK
     10EXPECTED (currentCue.id == '1') OK
    1511
    1612EVENT(exit)
    17 End time:
    18 EXPECTED (video.currentTime >= '2') OK
    19 EXPECTED (video.currentTime < '2.5') OK
    2013
    2114EVENT(enter)
    2215This cue is the currently active cue:
    2316EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    24 Start time:
    25 EXPECTED (video.currentTime >= '2.5') OK
    26 EXPECTED (video.currentTime < '3') OK
     17EXPECTED (currentCue.id == '2') OK
    2718
    2819EVENT(exit)
    29 End time:
    30 EXPECTED (video.currentTime >= '3.5') OK
    31 EXPECTED (video.currentTime < '4') OK
    3220
    3321EVENT(enter)
    3422This cue is the currently active cue:
    3523EXPECTED ([object TextTrackCue] == '[object TextTrackCue]') OK
    36 Start time:
    37 EXPECTED (video.currentTime >= '4') OK
    38 EXPECTED (video.currentTime < '4.5') OK
     24EXPECTED (currentCue.id == '3') OK
    3925
    4026EVENT(exit)
    41 End time:
    42 EXPECTED (video.currentTime >= '5') OK
    43 EXPECTED (video.currentTime < '5.5') OK
    4427
    4528END OF TEST
  • trunk/LayoutTests/media/track/track-cues-enter-exit.html

    r100064 r100296  
    88    </head>
    99    <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>
    1211        <video controls>
    1312            <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" kind="captions">
    1413        </video>
    1514        <script>           
    16            
    17         var timeInterval = 0.5
     15
    1816        var cueCount = 0;
     17        var currentCue;
    1918        var testTrack;
    2019
     
    2322            consoleWrite("EVENT(enter)");
    2423
    25             var currentCue = testTrack.track.cues[cueCount];
     24            currentCue = event.target;
    2625
    2726            consoleWrite("This cue is the currently active cue:");
    2827            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);
    3229            consoleWrite("");
    3330        }
     
    3633        {
    3734            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, '<');
    4435            consoleWrite("");
    4536
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r100292 r100296  
    38803880
    38813881BUGWK72149 : media/track/tracklist-is-reachable.html = TEXT
    3882 BUGWK72269 : media/track/track-cues-cuechange.html = PASS TEXT
    38833882
    38843883BUGV8_1821 WIN LINUX : http/tests/inspector-enabled/dedicated-workers-list.html = PASS CRASH
Note: See TracChangeset for help on using the changeset viewer.