Find all static android.webkit methods, and ensure we have test coverage for them. |
|||
Issue descriptionThis issue was raised when discussion the testing of the WebView Support Library - we want to make static android.webkit methods work correctly, and don't work weirdly with the support library. (torne@/aluo@ is this a good description of what we discussed in NY?)
,
Nov 11 2017
Static methods on WebView class are: - clearClientCertPreferences (new) - enableSlowWholeDocumentDraw (new) - findAddress - getCurrentWebViewPackage (new) - getSafeBrowsingPrivacyPolicyUrl (new) - setWebContentsDebuggingEnabled - startSafeBrowsing (new) I assume we only need coverage for the new methods, is that right?
,
Nov 13 2017
I think there are two different points here: 1. we want test coverage for all static methods (not only the new ones) 2. we want to ensure all the new static methods (the ones that will be in the support library) work as expected in the support library vs. android.webkit (i.e. if they need to share state then they should)
,
Apr 13 2018
Existing tests: - clearClientCertPreferences is tested in WebViewSslTest - findAddress is tested in WebViewTest - getCurrentWebViewPackage is essentially tested in GTS: WebViewDisablingTest - getSafeBrowsingPrivacyPolicyUrl is tested in WebViewTest - startSafeBrowsing has several tests in WebViewTest Non-existing tests: - enableSlowWholeDocumentDraw doesn't have a CTS test - I don't know how we would test that though - setWebContentsDebuggingEnabled doesn't seem to have a CTS test, but not sure how we would implement a test for that..
,
Apr 13 2018
I think all we need here is a test ensuring that some static method (i.e. some method using WebViewFactoryProvider.Statics) works correctly between WebView and the WebView Support Library (WebViewCompat). Nate, what do you think about using WebView.setSafeBrowsingWhitelist for this? I.e. doing something like 1. WebView.setSafeBrowsingWhitelist(foo) 2. ensure the whitelist is set correctly by navigating somewhere 3. WebViewCompat.setSafeBrowsingWhitelist(bar) 4. ensure the whitelist is set correctly by navigating somewhere
,
Apr 13 2018
That API could be good. There's a few ways to use this in a test: - whitelist either chrome://safe-browsing/match?type=malware or type=phishing (the only URLs guaranteed to be flagged as malicious) - pass the empty list to reset the whitelist - pass bad input, verify the callback is invoked and indicates failure I wrote CTS tests for setSafeBrowsingWhitelist, feel free to copy those.
,
Jun 1 2018
I'll take this |
|||
►
Sign in to add a comment |
|||
Comment 1 by gsennton@chromium.org
, Aug 15 2017