Skip to content
Permalink
Browse files
TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturingAndCalling is fail…
…ing on BigSur bot

https://bugs.webkit.org/show_bug.cgi?id=241798

Patch by Youenn Fablet <youennf@gmail.com> on 2022-06-21
Reviewed by Eric Carlson.

* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html:
Adding some more tests and logging to investigate what is wrong with the test in BigSur.

Canonical link: https://commits.webkit.org/251692@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Jun 21, 2022
1 parent 21d50bf commit d02e992455e36e2a415792d816406c2e136a2629
Showing 2 changed files with 16 additions and 4 deletions.
@@ -748,6 +748,10 @@ bool waitUntilMicrophoneState(WKWebView *webView, WKMediaCaptureState expectedSt
[webView stringByEvaluatingJavaScript:@"createConnection()"];
TestWebKitAPI::Util::run(&done);

done = false;
[webView stringByEvaluatingJavaScript:@"checkDecodingVideo('first')"];
TestWebKitAPI::Util::run(&done);

auto webViewPID = [webView _webProcessIdentifier];

// The GPU process should get launched.
@@ -776,7 +780,15 @@ bool waitUntilMicrophoneState(WKWebView *webView, WKMediaCaptureState expectedSt
EXPECT_EQ(webViewPID, [webView _webProcessIdentifier]);

done = false;
[webView stringByEvaluatingJavaScript:@"checkDecodingVideo()"];
[webView stringByEvaluatingJavaScript:@"checkVideoStatus()"];
TestWebKitAPI::Util::run(&done);

done = false;
[webView stringByEvaluatingJavaScript:@"checkAudioStatus()"];
TestWebKitAPI::Util::run(&done);

done = false;
[webView stringByEvaluatingJavaScript:@"checkDecodingVideo('second')"];
TestWebKitAPI::Util::run(&done);

EXPECT_EQ(gpuProcessPID, [processPool _gpuProcessIdentifier]);
@@ -170,7 +170,7 @@
});
}

function checkDecodingVideo(counter) {
function checkDecodingVideo(message, counter) {
if (!counter)
counter = 0;
getStats(pc2, "inbound-rtp", "video").then((stats) => {
@@ -179,10 +179,10 @@
return;
}
if (counter > 100) {
window.webkit.messageHandlers.gum.postMessage("FAIL checkDecodingVideo " + JSON.stringify(stats));
window.webkit.messageHandlers.gum.postMessage("FAIL checkDecodingVideo for " + message + ": " + JSON.stringify(stats));
return;
}
setTimeout(() => checkDecodingVideo(++counter), 50);
setTimeout(() => checkDecodingVideo(message, ++counter), 50);
});
}

0 comments on commit d02e992

Please sign in to comment.