Bug 152197

Summary: [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch. none

Eric Carlson
Reported 2015-12-11 16:01:32 PST
Add a setting to allow the mock media capture devices to be enabled and disabled
Attachments
Proposed patch. (22.91 KB, patch)
2015-12-11 16:14 PST, Eric Carlson
no flags
Eric Carlson
Comment 1 2015-12-11 16:14:45 PST
Created attachment 267201 [details] Proposed patch.
Dean Jackson
Comment 2 2015-12-11 16:39:02 PST
Comment on attachment 267201 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=267201&action=review > Source/WebKit2/UIProcess/API/C/WKPreferences.cpp:1432 > -void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef, bool javaEnabled) > +void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef, bool enabled) > { > - toImpl(preferencesRef)->setResourceUsageOverlayVisible(javaEnabled); > + toImpl(preferencesRef)->setResourceUsageOverlayVisible(enabled); Nice! > LayoutTests/fast/mediastream/mock-media-source.html:17 > + debug(`<br>*** Disable mock capture devices`); > + if (window.internals) > + evalAndLog(`internals.setMockMediaCaptureDevicesEnabled(false)`); > + navigator.mediaDevices > + .getUserMedia({audio:{}, video:{}}) > + .then(function(stream) { > + mediaStream = stream; > + testFailed(`mediaDevices.getUserMedia() succeeded when no devices should be available`); Not a suggestion to fix, but I don't like the way the backtick looks, so I use regular quotes if I don't have any of the ${} stuff.
WebKit Commit Bot
Comment 3 2015-12-11 17:52:17 PST
The commit-queue encountered the following flaky tests while processing attachment 267201 [details]: transitions/default-timing-function.html bug 138901 (author: simon.fraser@apple.com) http/tests/media/media-source/mediasource-append-buffer.html bug 152206 (author: jer.noble@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 4 2015-12-11 17:53:06 PST
Comment on attachment 267201 [details] Proposed patch. Clearing flags on attachment: 267201 Committed r194000: <http://trac.webkit.org/changeset/194000>
WebKit Commit Bot
Comment 5 2015-12-11 17:53:09 PST
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.