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

Unified Diff: content/test/test_web_contents.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
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 3a79e9eedd2bb7c2335bbbf5515d0c7d71b95107..678aa1fe74c090b29404f1ced9d92bdde13a25ca 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -174,6 +174,13 @@ void TestWebContents::SetOpener(TestWebContents* opener) {
Source<WebContents>(opener_));
}
+void TestWebContents::AddPendingContents(TestWebContents* contents) {
+ // This is normally only done in WebContentsImpl::CreateNewWindow.
+ pending_contents_[contents->GetRenderViewHost()->GetRoutingID()] = contents;
+ registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_DESTROYED,
+ Source<WebContents>(contents));
+}
+
void TestWebContents::ExpectSetHistoryLengthAndPrune(
const SiteInstance* site_instance,
int history_length,

Powered by Google App Engine
This is Rietveld 408576698