summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-02-04 16:35:10 +0000
committerBen Murdoch <benm@google.com>2010-02-04 16:54:06 +0000
commitfc4a69e9c13d7233876a0f507ebca2eec25a4215 (patch)
tree12ab9f6b6d08ba51b4133a2bb052b920c40a3ec8 /tests/DumpRenderTree
parent3141e0a62abe57e93e5d716895a2a57cc052bb50 (diff)
downloadframeworks_base-fc4a69e9c13d7233876a0f507ebca2eec25a4215.zip
frameworks_base-fc4a69e9c13d7233876a0f507ebca2eec25a4215.tar.gz
frameworks_base-fc4a69e9c13d7233876a0f507ebca2eec25a4215.tar.bz2
When a window is closed, destroy the WebView properly so that WebCore is informed of it's destruction.
Change-Id: I00002f53ec52c6056df4d7ddeec7cf0957423bd6
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index e8a66c1..2667520 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -670,7 +670,12 @@ public class TestShellActivity extends Activity implements LayoutTestController
public boolean onCreateWindow(WebView view, boolean dialog,
boolean userGesture, Message resultMsg) {
if (!mCanOpenWindows) {
- return false;
+ // We can't open windows, so just send null back.
+ WebView.WebViewTransport transport =
+ (WebView.WebViewTransport) resultMsg.obj;
+ transport.setWebView(null);
+ resultMsg.sendToTarget();
+ return true;
}
// We never display the new window, just create the view and
@@ -688,6 +693,11 @@ public class TestShellActivity extends Activity implements LayoutTestController
resultMsg.sendToTarget();
return true;
}
+
+ @Override
+ public void onCloseWindow(WebView view) {
+ view.destroy();
+ }
};
private static class NewWindowWebView extends WebView {