haikuwebkit/LayoutTests/fast/mediastream/screencapture-user-gesture-...

6 lines
190 B
Plaintext
Raw Permalink Normal View History

getDisplayMedia should be called on user gesture https://bugs.webkit.org/show_bug.cgi?id=197356 Source/WebCore: Reviewed by Eric Carlson. Allow getDisplayMedia on user gesture only. Otherwise reject the promise. Minor refactoring to align getDisplayMedia, getUserMedia and enumerateDevices when called with no document. Test: fast/mediastream/screencapture-user-gesture.html * Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::getUserMedia const): * Modules/mediastream/MediaDevices.h: * Modules/mediastream/NavigatorMediaDevices.h: * page/DOMWindow.h: * testing/Internals.cpp: (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint): * testing/Internals.h: * testing/Internals.idl: Tools: <rdar://problem/50296074> Reviewed by Eric Carlson. Update test configuration to inject internals so that we can use it to simulate a user click to call getDisplayMedia. * TestWebKitAPI/Tests/WebKit/getDisplayMedia.html: * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm: (TestWebKitAPI::GetDisplayMediaTest::SetUp): LayoutTests: Reviewed by Eric Carlson. * fast/mediastream/media-stream-page-muted.html: * fast/mediastream/screencapture-user-gesture-expected.txt: Added. * fast/mediastream/screencapture-user-gesture.html: Added. * http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt: * http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html: * http/tests/media/media-stream/get-display-media-prompt.html: * http/tests/media/media-stream/resources/get-display-media-devices-iframe.html: * resources/testharnessreport.js: Canonical link: https://commits.webkit.org/211577@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-29 20:04:33 +00:00
PASS Allow getDisplayMedia call in case of user gesture
PASS Disallow getDisplayMedia calls in case of user gesture if not the first call
PASS Deny getDisplayMedia call if no user gesture
getDisplayMedia should be called on user gesture https://bugs.webkit.org/show_bug.cgi?id=197356 Source/WebCore: Reviewed by Eric Carlson. Allow getDisplayMedia on user gesture only. Otherwise reject the promise. Minor refactoring to align getDisplayMedia, getUserMedia and enumerateDevices when called with no document. Test: fast/mediastream/screencapture-user-gesture.html * Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::getUserMedia const): * Modules/mediastream/MediaDevices.h: * Modules/mediastream/NavigatorMediaDevices.h: * page/DOMWindow.h: * testing/Internals.cpp: (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint): * testing/Internals.h: * testing/Internals.idl: Tools: <rdar://problem/50296074> Reviewed by Eric Carlson. Update test configuration to inject internals so that we can use it to simulate a user click to call getDisplayMedia. * TestWebKitAPI/Tests/WebKit/getDisplayMedia.html: * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm: (TestWebKitAPI::GetDisplayMediaTest::SetUp): LayoutTests: Reviewed by Eric Carlson. * fast/mediastream/media-stream-page-muted.html: * fast/mediastream/screencapture-user-gesture-expected.txt: Added. * fast/mediastream/screencapture-user-gesture.html: Added. * http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt: * http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html: * http/tests/media/media-stream/get-display-media-prompt.html: * http/tests/media/media-stream/resources/get-display-media-devices-iframe.html: * resources/testharnessreport.js: Canonical link: https://commits.webkit.org/211577@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-29 20:04:33 +00:00