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..13837316f4524c56fbec9059bab34381ecff89fd 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 |
Charlie Reis
2013/03/07 22:01:02
typo: that a if a
|
+// 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 |