Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1580)

Unified Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 611483002: Fix for crash when attaching a frame in WebUI renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: As suggested, factored out the solution and used in other extensions. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index f3441a240dfa7402c5653c69d6248a2d401db58e..5159281dcb0fbab868aff6df80741f836ce482e0 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -363,6 +363,19 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLSubframe) {
controller->GetPendingEntry())->frame_tree_node_id());
}
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
+ AppendingFrameInWebUIDoesNotCrash) {
+ const GURL kWebUIUrl("chrome://tracing");
+ const char kJSCodeForAppendingFrame[] =
+ "document.body.appendChild(document.createElement('iframe'));";
+
+ NavigateToURL(shell(), kWebUIUrl);
+
+ bool js_executed = content::ExecuteScript(shell()->web_contents(),
+ kJSCodeForAppendingFrame);
+ EXPECT_TRUE(js_executed);
+}
+
// Observer class to track the creation of RenderFrameHost objects. It is used
// in subsequent tests.
class RenderFrameCreatedObserver : public WebContentsObserver {
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698