Bug 236065

Summary: WebGL tests do not work on iOS devices due to universal access sandbox extension not granted
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: dino, kbr, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Kimmo Kinnunen 2022-02-03 01:01:06 PST
WebGL tests do not work on iOS devices due to universal access sandbox extension not granted

WTR on macOS and ios-simulator can run a file that loads another file from ../ (iframe, webgl tests). This needs UniversalFileAccess.
WTR on iOS device cannot create a sandbox extension for UniversalFileAccess. UI process will not  try to load the iframe because it does not know that url to be accessible.
Any way to fix the test runner on iOS devices?

WebPageProxy::maybeInitializeSandboxExtensionHandle will ask for universal file url extension, will fail. It will initialize baseurl -based extension, but since the iframe src is not in the base url, this is unused.

WebProcessProxy::checkURLReceivedFromWebProcess checks the iframe source. it will return false.  If the function returns true, the files load fine, so they don’t strictly need any sandbox extension.
Comment 1 Radar WebKit Bug Importer 2022-02-03 11:08:16 PST
<rdar://problem/88445505>
Comment 2 Kimmo Kinnunen 2022-02-09 12:12:46 PST
Talking with ap@, this probably should be resolved by:
1. using the WebView API to set the resource url to root of the layout tests directory on device, based on a new command-line argument
2. change the python script to pass the command-line argument

It's unclear how this interacts with the webkit-test-runner setting some layout tests have that tests the universal file access.