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

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

Issue 12602003: When a pending contents is created but deleted before it is shown, remove it from the list of pendi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 9 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | content/test/test_web_contents.h » ('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_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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/test/test_web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698