Changeset 236555 in webkit


Ignore:
Timestamp:
Sep 27, 2018 10:03:45 AM (6 years ago)
Author:
youenn@apple.com
Message:

LayoutTest webrtc/video-unmute.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=172879
<rdar://problem/32548738>

Reviewed by Eric Carlson.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • webrtc/video-unmute.html:

Resort on routines.js black frame routine.
Reenable test in mac and ios.

Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r236552 r236555  
     12018-09-27  Youenn Fablet  <youenn@apple.com>
     2
     3        LayoutTest webrtc/video-unmute.html is a flaky timeout
     4        https://bugs.webkit.org/show_bug.cgi?id=172879
     5        <rdar://problem/32548738>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * platform/ios-wk2/TestExpectations:
     10        * platform/mac-wk2/TestExpectations:
     11        * webrtc/video-unmute.html:
     12        Resort on routines.js black frame routine.
     13        Reenable test in mac and ios.
     14
    1152018-09-27  Andy Estes  <aestes@apple.com>
    216
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r236280 r236555  
    12501250webkit.org/b/181392 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html [ Pass Failure ]
    12511251
    1252 webkit.org/b/172879 webrtc/video-unmute.html [ Skip ]
    1253 
    12541252webkit.org/b/181957 [ Release ] http/tests/misc/resource-timing-resolution.html [ Pass Failure ]
    12551253
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r236552 r236555  
    805805webkit.org/b/181107 http/wpt/cache-storage/cache-put-stream.https.any.html [ Pass Failure ]
    806806
    807 webkit.org/b/172879 webrtc/video-unmute.html [ Skip ]
    808 
    809807webkit.org/b/181502 swipe/pushstate-with-manual-scrollrestoration.html [ Failure ]
    810808
  • trunk/LayoutTests/webrtc/video-unmute.html

    r218795 r236555  
    1212        <canvas id="canvas1" width="320" height="240"></canvas>
    1313        <canvas id="canvas2" width="320" height="240"></canvas>
    14         <canvas id="canvas3" width="320" height="240"></canvas>
    1514        <script src ="routines.js"></script>
    1615        <script>
    17 function isVideoBlack(id)
    18 {
    19     var canvas = document.getElementById(id);
    20     canvas.width = video.videoWidth;
    21     canvas.height = video.videoHeight;
    22     canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
    23 
    24     imageData = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);
    25     data = imageData.data;
    26     for (var cptr = 0; cptr < canvas.width * canvas.height; ++cptr) {
    27         // Approximatively black pixels.
    28         if (data[4 * cptr] > 10 || data[4 * cptr + 1] > 10 || data[4 * cptr + 2] > 10)
    29             return false;
    30     }
    31     return true;
    32 }
    33 
    34 function pollVideoBlackCheck(expected, id, resolve, reject, counter)
    35 {
    36     if (isVideoBlack(id) === expected) {
    37         resolve();
    38         return;
    39     }
    40 
    41     if (!counter)
    42         counter = 0;
    43     else if (++counter > 40) {
    44         reject("test for " + id + " timed out");
    45         return;
    46     }
    47     setTimeout(() => pollVideoBlackCheck(expected, id, resolve, reject, counter), 100);
    48 }
    49 
    50 function checkVideoBlack(expected, id)
    51 {
    52     return new Promise((resolve, reject) => {
    53         pollVideoBlackCheck(expected, id, resolve, reject);
    54     });
    55 }
    56 
    5716var track;
    5817var remoteTrack;
     
    8342
    8443promise_test((test) => {
    85     return checkVideoBlack(true, "canvas1");
     44    return checkVideoBlack(true, canvas1, video);
    8645}, "Track is disabled, video should be black");
    8746
    8847promise_test((test) => {
    8948    track.enabled = true;
    90     return checkVideoBlack(false, "canvas2");
     49    return checkVideoBlack(false, canvas2, video);
    9150}, "Track is enabled, video should not be black");
    9251
Note: See TracChangeset for help on using the changeset viewer.