Index: content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
index ba8007530802bf9b70563a5bd4b61f7543322b2a..a73daf14485a697b74340873e62396a5eca6e23d 100644 |
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
@@ -609,4 +609,17 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, ReloadEmbedder) { |
} |
} |
+IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, TerminateGuest) { |
+ const char* kEmbedderURL = "files/browser_plugin_embedder.html"; |
+ StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, ""); |
+ |
+ RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
+ test_embedder()->web_contents()->GetRenderViewHost()); |
+ rvh->ExecuteJavascriptAndGetValue(string16(), ASCIIToUTF16( |
+ "document.getElementById('plugin').terminate()")); |
+ |
+ // Expect the guest to crash. |
+ test_guest()->WaitForCrashed(); |
+} |
+ |
} // namespace content |