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, |