Bug 206958

Summary: [ macOS wk2 ] http/tests/media/media-stream/get-display-media-prompt.html is flaky failure
Product: WebKit Reporter: Jacob Uphoff <jacob_uphoff>
Component: Tools / TestsAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dbates, eric.carlson, esprehn+autocc, ews-watchlist, glenn, hta, jer.noble, kangil.han, philipj, sergio, tommyw, tsavell, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Update Test Expectations
none
Patch
none
Patch for landing none

Description Jacob Uphoff 2020-01-29 13:13:11 PST
http/tests/media/media-stream/get-display-media-prompt.html 

this test is a flaky failure on MacOS 

test is also flaky timing out 

I was able to reproduce the failure by running the test in iterations

History:
https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2Fmedia%2Fmedia-stream%2Fget-display-media-prompt.html
Diff:
--- /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/http/tests/media/media-stream/get-display-media-prompt-expected.txt
+++ /Volumes/Data/slave/catalina-release-tests-wk2/build/layout-test-results/http/tests/media/media-stream/get-display-media-prompt-actual.txt
@@ -40,12 +40,12 @@
 PASS err.name is "TypeError"
 
 ** Request a stream with valid constraints, the user should be prompted **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 3
-PASS stream.getAudioTracks().length is 0
-PASS stream.getVideoTracks().length is 1
+FAIL numberOfTimesGetUserMediaPromptHasBeenCalled() should be 3. Was 2.
+FAIL stream.getAudioTracks().length should be 0. Threw exception TypeError: undefined is not an object (evaluating 'stream.getAudioTracks')
+FAIL stream.getVideoTracks().length should be 1. Threw exception TypeError: undefined is not an object (evaluating 'stream.getVideoTracks')
 
 ** Request a stream with an exact audio constraint, it should be ignored **
-PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 4
+FAIL numberOfTimesGetUserMediaPromptHasBeenCalled() should be 4. Was 3.
 PASS stream.getAudioTracks().length is 0
 PASS stream.getVideoTracks().length is 1
Comment 1 Jacob Uphoff 2020-01-29 13:15:49 PST
here is the timeout bug https://bugs.webkit.org/show_bug.cgi?id=206959
Comment 2 Radar WebKit Bug Importer 2020-01-29 13:16:17 PST
<rdar://problem/59003765>
Comment 3 Jacob Uphoff 2020-01-29 13:21:02 PST
Created attachment 389177 [details]
Update Test Expectations
Comment 4 Truitt Savell 2020-01-29 13:26:11 PST
Comment on attachment 389177 [details]
Update Test Expectations

Clearing flags on attachment: 389177

Committed r255379: <https://trac.webkit.org/changeset/255379>
Comment 5 Alexey Proskuryakov 2020-01-30 15:24:34 PST
*** Bug 206959 has been marked as a duplicate of this bug. ***
Comment 6 Alexey Proskuryakov 2020-01-30 15:24:45 PST
No failures before 2019-11-05. First failure was with r252047, which was a media related change, but failures were not frequent enough to positively blame.
Comment 7 youenn fablet 2020-02-03 06:42:43 PST
Created attachment 389504 [details]
Patch
Comment 8 Eric Carlson 2020-02-03 07:15:00 PST
Comment on attachment 389504 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389504&action=review

> Source/WebCore/ChangeLog:11
> +        For that reason, we were storing a pointer to the gesture event and resetting in case the current gesture event was equal to the stored pointer.
> +        Instead, store a WeakPtr which ensures that if the previous event is destroyed, the weak pointer will be null and so will not have the same value as the new gesture event.

Nit: these lines are really long and should be wrapped.
Comment 9 youenn fablet 2020-02-03 08:19:24 PST
Created attachment 389512 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2020-02-03 12:44:53 PST
Comment on attachment 389512 [details]
Patch for landing

Clearing flags on attachment: 389512

Committed r255582: <https://trac.webkit.org/changeset/255582>
Comment 11 WebKit Commit Bot 2020-02-03 12:44:55 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 youenn fablet 2020-02-18 09:24:26 PST
Removing flaky test expectation in https://bugs.webkit.org/show_bug.cgi?id=207893.