Enable Javascript and images for AW committed interstitials
We are converting Android WebView Safe Browsing interstitials to committed interstitials, so that interstitials work more like other error pages. In WebView, existing error pages don't need to run JS, but interstitials do. This CL forces images and scripts to be enabled for error pages so that interstitials work properly (e.g., clicking on buttons works) even if the app has disabled JS for web content. Images and script are force-enabled by allowlisting the underlying error page URL in AwContentSettingsClient, similar to how content settings are allowlisted for error pages in ContentSettingsAgentImpl for Chrome (https://cs.chromium.org/chromium/src/chrome/renderer/content_settings_agent_impl.cc?type=cs&sq=package:chromium&g=0&l=616). I have not added tests in this CL because this will already be covered by existing Safe Browsing WebView tests once they are switched over to use committed interstitials (https://chromium-review.googlesource.com/c/chromium/src/+/1909276/). This CL can be manually tested by visiting a link on https://testsafebrowsing.appspot.com in an app that has Javascript disabled for WebView and clicking the "Details" link and observing that the interstitial UI changes. Bug: 1018809 Change-Id: I46f71738a2af3ff7361922ef0cde1522bcfb6e3e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017987Reviewed-by:Carlos IL <carlosil@chromium.org> Reviewed-by:
Bo <boliu@chromium.org> Commit-Queue: Emily Stark <estark@chromium.org> Cr-Commit-Position: refs/heads/master@{#734964}
Showing
Please register or sign in to comment