Layout Test webrtc/video-mute.html is flaky.
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Sep 2018 17:17:34 +0000 (17:17 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Sep 2018 17:17:34 +0000 (17:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177501

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test expectation.

* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
(WebCore::createBlackPixelBuffer): Make sure the whole buffer is properly initialized.

LayoutTests:

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* webrtc/routines.js: Increase counter to make test more robust.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236211 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/ios-wk2/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/webrtc/routines.js
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm

index 1aba0f1..05c0aa2 100644 (file)
@@ -1,3 +1,14 @@
+2018-09-19  Youenn Fablet  <youenn@apple.com>
+
+        Layout Test webrtc/video-mute.html is flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=177501
+
+        Reviewed by Eric Carlson.
+
+        * platform/ios-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * webrtc/routines.js: Increase counter to make test more robust.
+
 2018-09-19  Chris Dumez  <cdumez@apple.com>
 
         [iOS] Layout Test imported/w3c/web-platform-tests/beacon/beacon-basic-blob.html is a flaky failure
index 0b27c86..9c0b1ca 100644 (file)
@@ -1234,8 +1234,6 @@ webkit.org/b/176240 http/tests/websocket/tests/hybi/handshake-ok-with-legacy-web
 
 webkit.org/b/173608 webrtc/video-replace-muted-track.html [ Skip ]
 
-webkit.org/b/177501 webrtc/video-mute.html [ Pass Timeout ]
-
 webkit.org/b/187388 animations/needs-layout.html [ Pass ImageOnlyFailure ]
 webkit.org/b/172397 legacy-animation-engine/animations/needs-layout.html [ Pass ImageOnlyFailure ]
 
index a74d475..cf048f4 100644 (file)
@@ -783,8 +783,6 @@ webkit.org/b/176881 plugins/js-from-destroy.html [ Pass Failure ]
 
 webkit.org/b/178553 [ HighSierra Release ] imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/011.html [ Skip ]
 
-webkit.org/b/177501 webrtc/video-mute.html [ Pass Timeout ]
-
 webkit.org/b/165620 [ Sierra ] http/tests/cache/disk-cache/disk-cache-request-headers.html [ Pass Failure ]
 
 webkit.org/b/179773 imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html [ Pass Failure ]
index 11499ae..2fb0dc7 100644 (file)
@@ -195,7 +195,7 @@ async function checkVideoBlack(expected, canvas, video, errorMessage, counter)
 
     if (counter === undefined)
         counter = 0;
-    if (counter > 50) {
+    if (counter > 400) {
         if (!errorMessage)
             errorMessage = "checkVideoBlack timed out expecting " + expected;
         return Promise.reject(errorMessage);
index fa1c184..dbfda72 100644 (file)
@@ -1,3 +1,15 @@
+2018-09-19  Youenn Fablet  <youenn@apple.com>
+
+        Layout Test webrtc/video-mute.html is flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=177501
+
+        Reviewed by Eric Carlson.
+
+        Covered by updated test expectation.
+
+        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
+        (WebCore::createBlackPixelBuffer): Make sure the whole buffer is properly initialized.
+
 2018-09-19  David Kilzer  <ddkilzer@apple.com>
 
         WebCoreNSURLSession leaks an NSString (_sessionDescription) in -dealloc
index d86a59f..4e4a0f8 100644 (file)
@@ -73,9 +73,12 @@ RetainPtr<CVPixelBufferRef> createBlackPixelBuffer(size_t width, size_t height)
     status = CVPixelBufferLockBaseAddress(pixelBuffer, 0);
     ASSERT(status == noErr);
     void* data = CVPixelBufferGetBaseAddress(pixelBuffer);
+
     size_t yLength = width * height;
     memset(data, 0, yLength);
-    memset(static_cast<uint8_t*>(data) + yLength, 128, yLength / 2);
+
+    auto totalSize = CVPixelBufferGetDataSize(pixelBuffer);
+    memset(static_cast<uint8_t*>(data) + yLength, 128, totalSize - yLength);
 
     status = CVPixelBufferUnlockBaseAddress(pixelBuffer, 0);
     ASSERT(!status);