RESOLVED FIXED 220347
Stop using MediaRecorder in API test WebKit2.SpeechRecognitionErrorWhenStartingAudioCaptureOnDifferentPage
https://bugs.webkit.org/show_bug.cgi?id=220347
Summary Stop using MediaRecorder in API test WebKit2.SpeechRecognitionErrorWhenStarti...
Sihui Liu
Reported 2021-01-05 16:59:23 PST
...
Attachments
Patch (2.10 KB, patch)
2021-01-05 17:01 PST, Sihui Liu
no flags
Patch (4.41 KB, patch)
2021-01-06 10:44 PST, Sihui Liu
no flags
Patch for landing (4.49 KB, patch)
2021-01-08 09:44 PST, Sihui Liu
no flags
Patch for landing (4.23 KB, patch)
2021-01-08 09:45 PST, Sihui Liu
no flags
Sihui Liu
Comment 1 2021-01-05 17:01:05 PST
youenn fablet
Comment 2 2021-01-06 09:37:07 PST
Comment on attachment 417057 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417057&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:130 > + for (_WKExperimentalFeature *feature in [WKPreferences _experimentalFeatures]) { It might be best to not use media recorder or to make the test work in both cases (MediaRecorder on or off). WTR can use MediaRecorder with a mock backend in all platforms but the real backend is only supported for recent MacOS versions.
Sihui Liu
Comment 3 2021-01-06 10:44:17 PST
Sihui Liu
Comment 4 2021-01-07 09:00:10 PST
(In reply to youenn fablet from comment #2) > Comment on attachment 417057 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=417057&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:130 > > + for (_WKExperimentalFeature *feature in [WKPreferences _experimentalFeatures]) { > > It might be best to not use media recorder or to make the test work in both > cases (MediaRecorder on or off). > WTR can use MediaRecorder with a mock backend in all platforms but the real > backend is only supported for recent MacOS versions. Removed media recorder and use audio element instead.
Sihui Liu
Comment 5 2021-01-07 12:07:29 PST
*** Bug 220425 has been marked as a duplicate of this bug. ***
youenn fablet
Comment 6 2021-01-08 00:12:32 PST
Comment on attachment 417100 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417100&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:34 > +#import <WebKit/_WKExperimentalFeature.h> No longer needed. > Tools/TestWebKitAPI/Tests/WebKitCocoa/speechrecognition-basic.html:32 > + }; I would simplify this and just do: audio.play(); It might be best also to add the audio element to the DOM. Maybe just add something like: <audio id="audio" autoplay></audio> And then write audio.play() here.
Sihui Liu
Comment 7 2021-01-08 09:44:51 PST
Created attachment 417273 [details] Patch for landing
Sihui Liu
Comment 8 2021-01-08 09:45:29 PST
Created attachment 417274 [details] Patch for landing
EWS
Comment 9 2021-01-08 11:49:50 PST
Found 1 new test failure: media/controls/showControlsButton.html
EWS
Comment 10 2021-01-08 11:56:14 PST
Committed r271311: <https://trac.webkit.org/changeset/271311> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417274 [details].
Radar WebKit Bug Importer
Comment 11 2021-01-08 11:57:15 PST
Note You need to log in before you can comment on or make changes to this bug.