Commit f0a9f785 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

webview: enable file: URLs in UI tests explicitly.

Apps that target R or later default to setAllowFileAccess(false). Update
the WebView UI test code to explicitly enable it before trying to load
file:// URLs in the tests, so that it won't break once we build against
the R SDK.

Bug: 1106471
Change-Id: I863ffefcf2eec947062e2e99f2e40e60ec452fbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316400Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791826}
parent 50be36d9
...@@ -145,6 +145,7 @@ public class WebViewSyncWrapper { ...@@ -145,6 +145,7 @@ public class WebViewSyncWrapper {
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
mWebView.getSettings().setAllowFileAccess(true);
mWebView.loadUrl(FILE_URL_BASE + html); mWebView.loadUrl(FILE_URL_BASE + html);
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment