Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Maintenance work
View staffing
Description
Our WebView demo/test app in AndroidX (webkit:integration-tests:testapp) contains many different activities. These activities currently do not destroy their WebViews when the activity is destroyed (for example, by hitting the back button out of a demo). As such, WebViews may continue to exist after leaving a demo, maybe interacting with other demos in unexpected ways.
We should ideally override the activities' onDestroy methods to detach any WebViews from the view hierarchy and then destroy them. Different tests may need to account for nullable WebViews, multiple WebViews, etc...
In general, the approach should be similar to how it is done in CTS tests:https://cs.android.com/android/platform/superproject/main/+/main:cts/tests/tests/webkit/src/android/webkit/cts/WebViewCtsActivity.java;l=50-60;drc=76797f935af3f663c71e26546045fd19d7a55b4e