Title: [221208] trunk/Source
Revision
221208
Author
[email protected]
Date
2017-08-25 15:09:22 -0700 (Fri, 25 Aug 2017)

Log Message

Web Automation: add capabilities to control ICE candidate filtering and insecure media capture
https://bugs.webkit.org/show_bug.cgi?id=175563
<rdar://problem/33734492>

Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

Add macros for new capability protocol string names. Let's use a reverse
domain name notification for these capabilities so we know whether they are
intended for a particular client/port or any WebKit client, and what feature they
are related to (i.e., webrtc).

* inspector/remote/RemoteInspectorConstants.h:

Source/WebKit:

* UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::requestAutomationSessionWithCapabilities):
Translate new capabilities to _WKAutomationSessionConfiguration properties.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (221207 => 221208)


--- trunk/Source/_javascript_Core/ChangeLog	2017-08-25 22:05:19 UTC (rev 221207)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-08-25 22:09:22 UTC (rev 221208)
@@ -1,3 +1,18 @@
+2017-08-25  Brian Burg  <[email protected]>
+
+        Web Automation: add capabilities to control ICE candidate filtering and insecure media capture
+        https://bugs.webkit.org/show_bug.cgi?id=175563
+        <rdar://problem/33734492>
+
+        Reviewed by Joseph Pecoraro.
+
+        Add macros for new capability protocol string names. Let's use a reverse
+        domain name notification for these capabilities so we know whether they are
+        intended for a particular client/port or any WebKit client, and what feature they
+        are related to (i.e., webrtc).
+
+        * inspector/remote/RemoteInspectorConstants.h:
+
 2017-08-24  Brian Burg  <[email protected]>
 
         Web Automation: use automation session configurations to propagate per-session settings

Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h (221207 => 221208)


--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h	2017-08-25 22:05:19 UTC (rev 221207)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h	2017-08-25 22:09:22 UTC (rev 221208)
@@ -87,6 +87,12 @@
 #define WIRSessionCapabilitiesKey                  @"WIRSessionCapabilitiesKey"
 #define WIRAutomationSessionRequestMessage         @"WIRAutomationSessionRequestMessage"
 
+// These definitions are shared between WebDriver.framework and WebKit.
+// The value for WIRSessionCapabilitiesKey is a dictionary that holds these capability key-value pairs.
+
+#define WIRAllowInsecureMediaCaptureCapabilityKey      @"org.webkit.webdriver.webrtc.allow-insecure-media-capture"
+#define WIRSuppressICECandidateFilteringCapabilityKey  @"org.webkit.webdriver.webrtc.suppress-ice-candidate-filtering"
+
 // These definitions are shared with a Simulator webinspectord and
 // OS X process communicating with it.
 

Modified: trunk/Source/WebKit/ChangeLog (221207 => 221208)


--- trunk/Source/WebKit/ChangeLog	2017-08-25 22:05:19 UTC (rev 221207)
+++ trunk/Source/WebKit/ChangeLog	2017-08-25 22:09:22 UTC (rev 221208)
@@ -1,3 +1,15 @@
+2017-08-25  Brian Burg  <[email protected]>
+
+        Web Automation: add capabilities to control ICE candidate filtering and insecure media capture
+        https://bugs.webkit.org/show_bug.cgi?id=175563
+        <rdar://problem/33734492>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/Cocoa/AutomationClient.mm:
+        (WebKit::AutomationClient::requestAutomationSessionWithCapabilities):
+        Translate new capabilities to _WKAutomationSessionConfiguration properties.
+
 2017-08-24  Brian Burg  <[email protected]>
 
         Web Automation: use automation session configurations to propagate per-session settings

Modified: trunk/Source/WebKit/UIProcess/Cocoa/AutomationClient.mm (221207 => 221208)


--- trunk/Source/WebKit/UIProcess/Cocoa/AutomationClient.mm	2017-08-25 22:05:19 UTC (rev 221207)
+++ trunk/Source/WebKit/UIProcess/Cocoa/AutomationClient.mm	2017-08-25 22:09:22 UTC (rev 221208)
@@ -34,6 +34,7 @@
 #import "_WKAutomationDelegate.h"
 #import "_WKAutomationSessionConfiguration.h"
 #import <_javascript_Core/RemoteInspector.h>
+#import <_javascript_Core/RemoteInspectorConstants.h>
 #import <wtf/text/WTFString.h>
 
 using namespace Inspector;
@@ -77,6 +78,16 @@
 void AutomationClient::requestAutomationSessionWithCapabilities(NSString *sessionIdentifier, NSDictionary *forwardedCapabilities)
 {
     _WKAutomationSessionConfiguration *configuration = [_WKAutomationSessionConfiguration new];
+    if (NSNumber *value = forwardedCapabilities[WIRAllowInsecureMediaCaptureCapabilityKey]) {
+        if ([value isKindOfClass:[NSNumber class]])
+            configuration.allowsInsecureMediaCapture = value.boolValue;
+    }
+
+    if (NSNumber *value = forwardedCapabilities[WIRSuppressICECandidateFilteringCapabilityKey]) {
+        if ([value isKindOfClass:[NSNumber class]])
+            configuration.suppressesICECandidateFiltering = value.boolValue;
+    }
+
     // Force clients to create and register a session asynchronously. Otherwise,
     // RemoteInspector will try to acquire its lock to register the new session and
     // deadlock because it's already taken while handling XPC messages.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to