| Index: content/browser/web_contents/web_contents_impl_browsertest.cc
|
| ===================================================================
|
| --- content/browser/web_contents/web_contents_impl_browsertest.cc (revision 256801)
|
| +++ content/browser/web_contents/web_contents_impl_browsertest.cc (working copy)
|
| @@ -385,4 +385,23 @@
|
| EXPECT_EQ(observer.last_rfh(), shell()->web_contents()->GetMainFrame());
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
|
| + RenderViewCreatedForChildWindow) {
|
| + ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
|
| +
|
| + NavigateToURL(shell(),
|
| + embedded_test_server()->GetURL("/title1.html"));
|
| +
|
| + WebContentsAddedObserver new_web_contents_observer;
|
| + ASSERT_TRUE(ExecuteScript(shell()->web_contents(),
|
| + "var a = document.createElement('a');"
|
| + "a.href='./title2.html';"
|
| + "a.target = '_blank';"
|
| + "document.body.appendChild(a);"
|
| + "a.click();"));
|
| + WebContents* new_web_contents = new_web_contents_observer.GetWebContents();
|
| + WaitForLoadStop(new_web_contents);
|
| + EXPECT_TRUE(new_web_contents_observer.RenderViewCreatedCalled());
|
| +}
|
| +
|
| } // namespace content
|
|
|