[wv] Destroy a child window's WebView in MockWebChromeClient

This change adds code to store the WebView instance created in
MockWebChromeClient#onCreateWindow() as a member of MockWebChromeClient.
MockWebChromeClient#onCloseWindow() removes this instance from the view
hierarchy and destroys it (if it's not null).

Test: atest CtsWebkitTestCases:android.webkit.cts.WebChromeClientTest#testWindows CtsWebkitTestCases:android.webkit.cts.WebViewClientTest#testOnRenderProcessGone  -- --abi x86_64
Bug: b/208312115, b/214429510

Change-Id: I64f983fbf670814275b2a07bbdf1eda585cd4ec6
(cherry picked from commit b88877105641dcb9ef121d12d6ba34e8417eeead)
Merged-In: I64f983fbf670814275b2a07bbdf1eda585cd4ec6
1 file changed