Index: content/test/test_web_contents.cc |
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc |
index b852b0bfecb7d5a6901e47230caf1d365de6b22f..73b8c061377ebf9b85c8873116165b104e844777 100644 |
--- a/content/test/test_web_contents.cc |
+++ b/content/test/test_web_contents.cc |
@@ -28,7 +28,7 @@ |
namespace content { |
TestWebContents::TestWebContents(BrowserContext* browser_context) |
- : WebContentsImpl(browser_context, NULL), |
+ : WebContentsImpl(browser_context), |
delegate_view_override_(NULL), |
expect_set_history_offset_and_length_(false), |
expect_set_history_offset_and_length_history_length_(0) { |
@@ -219,10 +219,7 @@ RenderViewHostDelegateView* TestWebContents::GetDelegateView() { |
} |
void TestWebContents::SetOpener(TestWebContents* opener) { |
- // This is normally only set in the WebContents constructor, which also |
- // registers an observer for when the opener gets closed. |
- opener_ = opener; |
- AddDestructionObserver(opener_); |
+ frame_tree_.root()->SetOpener(opener->GetFrameTree()->root()); |
} |
void TestWebContents::AddPendingContents(TestWebContents* contents) { |