Bug 204512 - [Cocoa] Run camera capture in UIProcess by default in layout tests
Summary: [Cocoa] Run camera capture in UIProcess by default in layout tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 204750
  Show dependency treegraph
 
Reported: 2019-11-22 06:18 PST by youenn fablet
Modified: 2019-12-04 07:25 PST (History)
12 users (show)

See Also:


Attachments
Patch (5.11 KB, patch)
2019-11-22 06:20 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (17.49 KB, patch)
2019-12-02 07:48 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (18.03 KB, patch)
2019-12-02 09:30 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (20.45 KB, patch)
2019-12-03 01:02 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-11-22 06:18:42 PST
Move camera capture to UIProcess by default
Comment 1 youenn fablet 2019-11-22 06:20:47 PST
Created attachment 384147 [details]
Patch
Comment 2 youenn fablet 2019-12-02 07:43:41 PST
Three tests are failing:
- fast/mediastream/mediastreamtrack-video-clone.html: we need to handle video source resizing correctly when cloned if source is captured in UIProcess.
- webrtc/video-rotation.html: our internals API does not work to simulate rotation in UIProcess, we also need to handle orientation monitoring in UIProcess capture side. 
- fast/mediastream/mock-media-source.html: this test is only disabling mock capture in web process but is keeping mock capture in UIProcess. We cannot currently run tests with real capture devices on. We should update the test and remove the internals API.
Comment 3 youenn fablet 2019-12-02 07:48:44 PST
Created attachment 384620 [details]
Patch
Comment 4 Eric Carlson 2019-12-02 08:59:21 PST
Comment on attachment 384620 [details]
Patch

r=me once the iOS-WK2 bot is happy
Comment 5 youenn fablet 2019-12-02 09:29:41 PST
I forgot to update hasSameInitializationOptions, will fix it.
Comment 6 youenn fablet 2019-12-02 09:30:25 PST
Created attachment 384633 [details]
Patch for landing
Comment 7 youenn fablet 2019-12-03 01:02:05 PST
Created attachment 384696 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2019-12-03 03:11:52 PST
Comment on attachment 384696 [details]
Patch for landing

Clearing flags on attachment: 384696

Committed r253033: <https://trac.webkit.org/changeset/253033>
Comment 9 WebKit Commit Bot 2019-12-03 03:11:53 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-12-03 03:12:23 PST
<rdar://problem/57586831>
Comment 11 Truitt Savell 2019-12-03 10:49:18 PST
It looks like the changes in https://trac.webkit.org/changeset/253033/webkit

broke inspector/page/overrideSetting-MockCaptureDevicesEnabled.html

History:
https://results.webkit.org/?suite=layout-tests&test=inspector%2Fpage%2FoverrideSetting-MockCaptureDevicesEnabled.html

Diff:
--- /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/inspector/page/overrideSetting-MockCaptureDevicesEnabled-expected.txt
+++ /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/inspector/page/overrideSetting-MockCaptureDevicesEnabled-actual.txt
@@ -1,11 +1,4 @@
+ALERT: Uncaught exception in test page: TypeError: window.internals.setMockMediaCaptureDevicesEnabled is not a function. (In 'window.internals.setMockMediaCaptureDevicesEnabled(false)', 'window.internals.setMockMediaCaptureDevicesEnabled' is undefined) [file:///Volumes/Data/slave/mojave-release-tests-wk2/build/LayoutTests/inspector/page/overrideSetting-MockCaptureDevicesEnabled.html:8]
+CONSOLE MESSAGE: line 8: TypeError: window.internals.setMockMediaCaptureDevicesEnabled is not a function. (In 'window.internals.setMockMediaCaptureDevicesEnabled(false)', 'window.internals.setMockMediaCaptureDevicesEnabled' is undefined)
+CONSOLE MESSAGE: line 168: TypeError: null is not an object (evaluating 'document.body.appendChild')
 Tests for the Page.overrideSetting command.
-
-
-== Running test suite: Page.overrideSetting
--- Running test case: Page.overrideSetting.MockCaptureDevicesEnabled
-Expected Error: The I/O read operation failed.
-Overriding MockCaptureDevicesEnabled to true...
-PASS: getUserMedia should not fail when no devices are available
-Removing MockCaptureDevicesEnabled override...
-Expected Error: The I/O read operation failed.
-
Comment 12 youenn fablet 2019-12-03 11:07:54 PST
> Diff:
> ---
> /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/
> inspector/page/overrideSetting-MockCaptureDevicesEnabled-expected.txt
> +++
> /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/
> inspector/page/overrideSetting-MockCaptureDevicesEnabled-actual.txt
> @@ -1,11 +1,4 @@
> +ALERT: Uncaught exception in test page: TypeError:
> window.internals.setMockMediaCaptureDevicesEnabled is not a function. (In
> 'window.internals.setMockMediaCaptureDevicesEnabled(false)',
> 'window.internals.setMockMediaCaptureDevicesEnabled' is undefined)
> [file:///Volumes/Data/slave/mojave-release-tests-wk2/build/LayoutTests/
> inspector/page/overrideSetting-MockCaptureDevicesEnabled.html:8]
> +CONSOLE MESSAGE: line 8: TypeError:
> window.internals.setMockMediaCaptureDevicesEnabled is not a function. (In
> 'window.internals.setMockMediaCaptureDevicesEnabled(false)',
> 'window.internals.setMockMediaCaptureDevicesEnabled' is undefined)

We need to update the test or even remove it as we removed that internals API.
Comment 13 youenn fablet 2019-12-04 07:25:01 PST
> We need to update the test or even remove it as we removed that internals
> API.

Fix at bug 204849.