| Index: content/browser/web_contents/web_contents_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| index 6ec83207a1e3ac031741ceab54d9273b7f688181..80b8713ba610ac699d5c911913afbf25a4ef973b 100644
|
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc
|
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| @@ -2037,5 +2037,15 @@ TEST_F(WebContentsImplTest, FilterURLs) {
|
| EXPECT_EQ(url_normalized, other_observer.last_url());
|
| }
|
|
|
| +// Test that if a pending contents is deleted before it is shown, we don't
|
| +// crash.
|
| +TEST_F(WebContentsImplTest, PendingContents) {
|
| + scoped_ptr<TestWebContents> other_contents(
|
| + static_cast<TestWebContents*>(CreateTestWebContents()));
|
| + contents()->AddPendingContents(other_contents.get());
|
| + int route_id = other_contents->GetRenderViewHost()->GetRoutingID();
|
| + other_contents.reset();
|
| + EXPECT_EQ(NULL, contents()->GetCreatedWindow(route_id));
|
| +}
|
|
|
| } // namespace content
|
|
|