Changeset 236555 in webkit
- Timestamp:
- Sep 27, 2018 10:03:45 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r236552 r236555 1 2018-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 1 15 2018-09-27 Andy Estes <aestes@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r236280 r236555 1250 1250 webkit.org/b/181392 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html [ Pass Failure ] 1251 1251 1252 webkit.org/b/172879 webrtc/video-unmute.html [ Skip ]1253 1254 1252 webkit.org/b/181957 [ Release ] http/tests/misc/resource-timing-resolution.html [ Pass Failure ] 1255 1253 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r236552 r236555 805 805 webkit.org/b/181107 http/wpt/cache-storage/cache-put-stream.https.any.html [ Pass Failure ] 806 806 807 webkit.org/b/172879 webrtc/video-unmute.html [ Skip ]808 809 807 webkit.org/b/181502 swipe/pushstate-with-manual-scrollrestoration.html [ Failure ] 810 808 -
trunk/LayoutTests/webrtc/video-unmute.html
r218795 r236555 12 12 <canvas id="canvas1" width="320" height="240"></canvas> 13 13 <canvas id="canvas2" width="320" height="240"></canvas> 14 <canvas id="canvas3" width="320" height="240"></canvas>15 14 <script src ="routines.js"></script> 16 15 <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 57 16 var track; 58 17 var remoteTrack; … … 83 42 84 43 promise_test((test) => { 85 return checkVideoBlack(true, "canvas1");44 return checkVideoBlack(true, canvas1, video); 86 45 }, "Track is disabled, video should be black"); 87 46 88 47 promise_test((test) => { 89 48 track.enabled = true; 90 return checkVideoBlack(false, "canvas2");49 return checkVideoBlack(false, canvas2, video); 91 50 }, "Track is enabled, video should not be black"); 92 51
Note: See TracChangeset
for help on using the changeset viewer.