[iOS] Extend CWTChromeDriver to support fuzzing
CWTChromeDriver contains a partial implementation of the WebDriver protocol for browser automation, used for Web Platform Tests. This CL adds support for a new "chrome_crashtest" command, that can be used for fuzzing. This new command is similar to the existing "url" command, that loads a URL and waits for it to finish loading. However, the new command waits for an additional amount of time (specified as an argument) after page load to catch cases where a test page crashes just after page load is complete rather than during load. This new command also extracts the stderr output of the app process and returns it to the caller. This is needed for fuzzing because ASan crash stacks will be sent to the app process' stderr before the app process is terminated due to a bug found by ASan. Finally, this new command supports "file:///" URLs by serving the given file using an EmbeddedTestServer, since Chrome on iOS does not support directly loading such URLs. This is useful for fuzzing since fuzzing test cases are typically provided as a local HTML file. CWTChromeDriver is not shipped to end users (unlike ChromeDriver on non-iOS platforms), so supporting a non-standard command for test purposes does not create any compatibility issues. Change-Id: I84ad0100e40c12065a18325501d997a5b34220dd Bug: 1158540 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2600023Reviewed-by:Olivier Robin <olivierrobin@chromium.org> Commit-Queue: Ali Juma <ajuma@chromium.org> Cr-Commit-Position: refs/heads/master@{#846117}
Showing
Please register or sign in to comment