This patch also implements the first permission, getUserMedia.
<rdar://problem/34493846>
<rdar://problem/34609571>
Created attachment 321617 [details] Patch
Comment on attachment 321617 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321617&action=review > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1259 > + case Inspector::Protocol::Automation::MockPermission::GetUserMedia: > + m_mockPermissionForGetUserMedia = permissionValue; > + } I would add a break here, even if there aren't more options yet.
Comment on attachment 321617 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321617&action=review r=me. You might need a WK2 Owner to approve the UserMediaPermissionRequestManagerProxy change, but the rest looks good to me. > Source/WebKit/UIProcess/Automation/Automation.json:222 > + "id": "MockPermission", I'm not loving the Mock part of this name. Effectively you are setting the permission for the session, so I don't think Mock is necessary. If the intent is to portray that this is unique from the real system / user permissions then replacing Mock with Session would be event clearer. `getMockPermissions` => `getSessionPermissions`. Whether or not Mock stays in the commands below, it doesn't need to be included in these type names. >> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1259 >> + } > > I would add a break here, even if there aren't more options yet. +1. I'm surprised this didn't get a compiler warning. Maybe we haven't enabled -Wimplicit-fallthrough in all files? I think C++ is supposed to have it thought. > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1268 > + Nit: Extra newline.
Created attachment 321821 [details] Patch
Comment on attachment 321821 [details] Patch Clearing flags on attachment: 321821 Committed r222503: <http://trac.webkit.org/changeset/222503>
All reviewed patches have been landed. Closing bug.