RESOLVED FIXED 186958
Add API to control mock media devices
https://bugs.webkit.org/show_bug.cgi?id=186958
Summary Add API to control mock media devices
youenn fablet
Reported 2018-06-22 18:48:46 PDT
This will allow improving testing
Attachments
Patch (63.74 KB, patch)
2018-06-22 18:56 PDT, youenn fablet
no flags
Patch (69.16 KB, patch)
2018-06-22 21:37 PDT, youenn fablet
no flags
Patch (75.76 KB, patch)
2018-06-23 10:23 PDT, youenn fablet
no flags
Patch for landing (75.69 KB, patch)
2018-06-25 10:17 PDT, youenn fablet
no flags
Patch for landing (75.69 KB, patch)
2018-06-25 11:13 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-06-22 18:56:07 PDT
youenn fablet
Comment 2 2018-06-22 21:37:52 PDT
youenn fablet
Comment 3 2018-06-23 10:23:22 PDT
youenn fablet
Comment 4 2018-06-23 14:35:48 PDT
Comment on attachment 343441 [details] Patch Patch is ready for a first round of review. I need to beef-up the change log, especially the changes to MediaDevices to ensure it is not GCed while dispatching events.
Radar WebKit Bug Importer
Comment 5 2018-06-23 14:36:16 PDT
Eric Carlson
Comment 6 2018-06-25 08:20:44 PDT
Comment on attachment 343441 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343441&action=review > Source/WebKit/UIProcess/API/C/WKMockMediaDevice.cpp:48 > +static inline std::optional<Properties> typeFromString(const String& type) > +{ > + if (type == "camera") > + return Properties { WebCore::MockCameraProperties { } }; > + if (type == "microphone") > + return Properties { WebCore::MockMicrophoneProperties { } }; > + if (type == "screen") > + return Properties { WebCore::MockDisplayProperties { } }; > + return std::nullopt; > +} Nit: this is only used in one place. Is there a plan to use it in more place?
youenn fablet
Comment 7 2018-06-25 10:17:11 PDT
Created attachment 343508 [details] Patch for landing
youenn fablet
Comment 8 2018-06-25 11:13:41 PDT
Created attachment 343517 [details] Patch for landing
WebKit Commit Bot
Comment 9 2018-06-25 12:19:13 PDT
Comment on attachment 343517 [details] Patch for landing Clearing flags on attachment: 343517 Committed r233162: <https://trac.webkit.org/changeset/233162>
WebKit Commit Bot
Comment 10 2018-06-25 12:19:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.