OLD | NEW |
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 Loading... |
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 |
OLD | NEW |