Bug 186846

Summary: Enable mock capture devices on the iOS simulator
Product: WebKit Reporter: Karthik <karthik>
Component: WebRTCAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 11   
Attachments:
Description Flags
Patch none

Description Karthik 2018-06-20 07:59:25 PDT
Testing webRTC or making webRTC calls on iphone/ipad emulator is not possible at the moment. 
We assume it is because there are no media devices enumerated.

The solution for this will be enabling the fake media source on the emulators so that webRTC calls can be placed.
Comment 1 Radar WebKit Bug Importer 2018-06-20 07:59:38 PDT
<rdar://problem/41289134>
Comment 2 Eric Carlson 2018-06-25 10:54:28 PDT
Created attachment 343514 [details]
Patch
Comment 3 Eric Carlson 2018-06-26 10:00:21 PDT
Comment on attachment 343514 [details]
Patch

>Subversion Revision: 233147
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
>index 542a83de155e76a30f1d8e3b9140de335fdcd7bf..9026180b4a28fcfd0325cb8db9e89db4a2ad4a48 100644
>--- a/Source/WebKit/ChangeLog
>+++ b/Source/WebKit/ChangeLog
>@@ -1,3 +1,15 @@
>+2018-06-25  Eric Carlson  <eric.carlson@apple.com>
>+
>+        Enable mock capture devices on the iOS simulator
>+        https://bugs.webkit.org/show_bug.cgi?id=186846
>+        <rdar://problem/41289134>
>+
>+        Reviewed by NOBODY (OOPS!).
>+
>+        * Shared/WebPreferences.yaml: Use DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED.
>+        * Shared/WebPreferencesDefaultValues.h: Define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED, set to
>+        true in the iOS simulator only.
>+
> 2018-06-24  Michael Catanzaro  <mcatanzaro@igalia.com>
> 
>         Unreviewed, fix GTK debug build after r233131
>diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
>index 542a45c17a78f97e0454e610ce5308dab3a4c301..cf07f047c734446736786d20df0ce3a8eea31ee8 100644
>--- a/Source/WebKit/Shared/WebPreferences.yaml
>+++ b/Source/WebKit/Shared/WebPreferences.yaml
>@@ -570,7 +570,7 @@ HTTPEquivEnabled:
> 
> MockCaptureDevicesEnabled:
>   type: bool
>-  defaultValue: false
>+  defaultValue: DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED
>   webcoreBinding: DeprecatedGlobalSettings
>   condition: ENABLE(MEDIA_STREAM)
> 
>diff --git a/Source/WebKit/Shared/WebPreferencesDefaultValues.h b/Source/WebKit/Shared/WebPreferencesDefaultValues.h
>index 514282d91e675460995fb6ee20f6af211e364ca3..15f3459bbda2d7bed6458257d66ab5f3a80a1505 100644
>--- a/Source/WebKit/Shared/WebPreferencesDefaultValues.h
>+++ b/Source/WebKit/Shared/WebPreferencesDefaultValues.h
>@@ -112,9 +112,11 @@
> #if PLATFORM(IOS_SIMULATOR)
> #define DEFAULT_ACCELERATED_DRAWING_ENABLED false
> #define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING false
>+#define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED true
> #else
> #define DEFAULT_ACCELERATED_DRAWING_ENABLED true
> #define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING true
>+#define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED false
> #endif
> 
> #if PLATFORM(COCOA)
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
>index 9d67f5c3f7366efc2084b74d4f421086966c220a..4f2baaa1ab4182128516b81206bb674d5f944840 100644
>--- a/LayoutTests/ChangeLog
>+++ b/LayoutTests/ChangeLog
>@@ -1,3 +1,13 @@
>+2018-06-25  Eric Carlson  <eric.carlson@apple.com>
>+
>+        Enable mock capture devices on the iOS simulator
>+        https://bugs.webkit.org/show_bug.cgi?id=186846
>+        <rdar://problem/41289134>
>+
>+        Reviewed by NOBODY (OOPS!).
>+
>+        * platform/ios/TestExpectations: Unskip fast/mediastream/getUserMedia-default.html.
>+
> 2018-06-25  Antoine Quint  <graouts@apple.com>
> 
>         [Web Animations] Make imported/mozilla/css-animations/test_animation-pausing.html pass reliably
>diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations
>index b366d4eed78d3ab644d412a76a67bc6be3763b64..2b188403ef0899d23d7b8b2ba69768e949ed35f3 100644
>--- a/LayoutTests/platform/ios/TestExpectations
>+++ b/LayoutTests/platform/ios/TestExpectations
>@@ -87,11 +87,14 @@ fast/events/continuous-platform-wheelevent-in-scrolling-div.html [ Skip ]
> compositing/video/video-background-color.html [ WontFix ]
> 
> # Not supported on iOS
>-fast/mediastream
> fast/speechsynthesis
> gamepad
> mhtml
> 
>+# Some media stream tests crash because of OS issues, so skip all but one while we investigate.
>+fast/mediastream [ Skip ]
>+fast/mediastream/getUserMedia-default.html [ Pass ]
>+
> # ENABLE(MEDIA_CAPTURE) is not enabled
> fast/forms/file/file-input-capture.html
>
Comment 4 WebKit Commit Bot 2018-06-26 10:06:34 PDT
Comment on attachment 343514 [details]
Patch

Clearing flags on attachment: 343514

Committed r233203: <https://trac.webkit.org/changeset/233203>
Comment 5 WebKit Commit Bot 2018-06-26 10:06:36 PDT
All reviewed patches have been landed.  Closing bug.