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

Unified Diff: content/browser/frame_host/render_frame_host_impl_browsertest.cc

Issue 2932453002: PlzNavigate: Release StreamHandle. (Closed)
Patch Set: Experiment: Use a RenderFrameObserver. Created 3 years, 6 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/browser/frame_host/render_frame_host_impl_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_impl_browsertest.cc b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
index b5d03afe2ea34953bc207ba59894e1959530cad0..ad3e74a079a4dc704e24f60fde44fcaee276c7e3 100644
--- a/content/browser/frame_host/render_frame_host_impl_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
@@ -353,4 +353,13 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
EXPECT_TRUE(is_closed);
}
+// After a navigation, the StreamHandle must be released.
+IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest, StreamHandleReleased) {
+ EXPECT_TRUE(NavigateToURL(shell(), GetTestUrl("", "title1.html")));
+ WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
+ RenderFrameHostImpl* main_frame =
+ static_cast<RenderFrameHostImpl*>(wc->GetMainFrame());
+ EXPECT_EQ(nullptr, main_frame->stream_handle());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698