| Index: content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| index c0afa6718885eef93b86cdd0888ecee92c5869bc..8e44208c5d5f841e91a5c585e5f55e166ba27f5a 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| +++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| @@ -1049,6 +1049,14 @@ TEST_F(RenderFrameHostManagerTest, WebUI) {
|
| false /* is_renderer_init */);
|
| RenderFrameHostImpl* host = manager->Navigate(entry);
|
|
|
| + // This test creates a second FrameTree for the WebContents which throws off
|
| + // some of the accounting. This inverts what was done in
|
| + // WebContentsImpl::NotifySwapped.
|
| + static_cast<SiteInstanceImpl*>(instance)->
|
| + IncrementRelatedActiveContentsCount();
|
| + static_cast<SiteInstanceImpl*>(host->GetSiteInstance())->
|
| + DecrementRelatedActiveContentsCount();
|
| +
|
| // We commit the pending RenderFrameHost immediately because the previous
|
| // RenderFrameHost was not live. We test a case where it is live in
|
| // WebUIInNewTab.
|
| @@ -1115,6 +1123,14 @@ TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) {
|
| EXPECT_TRUE(
|
| host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI);
|
|
|
| + // This test creates a second FrameTree for the WebContents which throws off
|
| + // some of the accounting. This inverts what was done in
|
| + // WebContentsImpl::NotifySwapped.
|
| + static_cast<SiteInstanceImpl*>(blank_instance)->
|
| + IncrementRelatedActiveContentsCount();
|
| + static_cast<SiteInstanceImpl*>(host1->GetSiteInstance())->
|
| + DecrementRelatedActiveContentsCount();
|
| +
|
| // Now simulate clicking a link that opens in a new tab.
|
| scoped_ptr<TestWebContents> web_contents2(
|
| TestWebContents::Create(browser_context(), webui_instance));
|
|
|