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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl_browsertest.cc

Issue 2932453002: PlzNavigate: Release StreamHandle. (Closed)
Patch Set: Addressed comments (+Rebase) 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/common/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/public/browser/javascript_dialog_manager.h" 10 #include "content/public/browser/javascript_dialog_manager.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 RenderFrameDeletedObserver deleted_observer( 346 RenderFrameDeletedObserver deleted_observer(
347 new_shell->web_contents()->GetMainFrame()); 347 new_shell->web_contents()->GetMainFrame());
348 deleted_observer.WaitUntilDeleted(); 348 deleted_observer.WaitUntilDeleted();
349 349
350 bool is_closed = false; 350 bool is_closed = false;
351 EXPECT_TRUE(ExecuteScriptAndExtractBool( 351 EXPECT_TRUE(ExecuteScriptAndExtractBool(
352 shell(), "domAutomationController.send(popup.closed)", &is_closed)); 352 shell(), "domAutomationController.send(popup.closed)", &is_closed));
353 EXPECT_TRUE(is_closed); 353 EXPECT_TRUE(is_closed);
354 } 354 }
355 355
356 // After a navigation, the StreamHandle must be released.
357 IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest, StreamHandleReleased) {
358 EXPECT_TRUE(NavigateToURL(shell(), GetTestUrl("", "title1.html")));
359 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
360 RenderFrameHostImpl* main_frame =
361 static_cast<RenderFrameHostImpl*>(wc->GetMainFrame());
362 EXPECT_EQ(nullptr, main_frame->stream_handle_for_testing());
363 }
364
356 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698