Chromium Code Reviews| 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..d08404ca3ddc65044c1906f5bb7a4b2bb3be5571 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 a if a pending contents is deleted before it is shown, we don't |
| +// creash. |
|
Charlie Reis
2013/03/07 18:20:00
nit: crash
jochen (gone - plz use gerrit)
2013/03/07 19:45:10
Done.
|
| +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 |