| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2353 | 2353 |
| 2354 // Navigate the main tab to the site of the popup. This will cause the | 2354 // Navigate the main tab to the site of the popup. This will cause the |
| 2355 // RenderView for b.com in the main tab to be recreated. If the issue | 2355 // RenderView for b.com in the main tab to be recreated. If the issue |
| 2356 // is not fixed, this will result in process crash and failing test. | 2356 // is not fixed, this will result in process crash and failing test. |
| 2357 EXPECT_TRUE(NavigateToURL( | 2357 EXPECT_TRUE(NavigateToURL( |
| 2358 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); | 2358 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); |
| 2359 } | 2359 } |
| 2360 | 2360 |
| 2361 // Ensure that we don't crash the renderer in CreateRenderView if a proxy goes | 2361 // Ensure that we don't crash the renderer in CreateRenderView if a proxy goes |
| 2362 // away between swapout and the next navigation. See https://crbug.com/581912. | 2362 // away between swapout and the next navigation. See https://crbug.com/581912. |
| 2363 // Dr.Memory reports a use-after-free in this test, thus it may be flaky on |
| 2364 // Windows. See https://crbug.com/600957. |
| 2365 #if defined(OS_WIN) |
| 2366 #define MAYBE_CreateRenderViewAfterProcessKillAndClosedProxy \ |
| 2367 DISABLED_CreateRenderViewAfterProcessKillAndClosedProxy |
| 2368 #else |
| 2369 #define MAYBE_CreateRenderViewAfterProcessKillAndClosedProxy \ |
| 2370 CreateRenderViewAfterProcessKillAndClosedProxy |
| 2371 #endif |
| 2363 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, | 2372 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
| 2364 CreateRenderViewAfterProcessKillAndClosedProxy) { | 2373 MAYBE_CreateRenderViewAfterProcessKillAndClosedProxy) { |
| 2365 StartEmbeddedServer(); | 2374 StartEmbeddedServer(); |
| 2366 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) | 2375 FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) |
| 2367 ->GetFrameTree() | 2376 ->GetFrameTree() |
| 2368 ->root(); | 2377 ->root(); |
| 2369 | 2378 |
| 2370 // Give an initial page an unload handler that never completes. | 2379 // Give an initial page an unload handler that never completes. |
| 2371 EXPECT_TRUE(NavigateToURL( | 2380 EXPECT_TRUE(NavigateToURL( |
| 2372 shell(), embedded_test_server()->GetURL("a.com", "/title1.html"))); | 2381 shell(), embedded_test_server()->GetURL("a.com", "/title1.html"))); |
| 2373 EXPECT_TRUE(ExecuteScript(root->current_frame_host(), | 2382 EXPECT_TRUE(ExecuteScript(root->current_frame_host(), |
| 2374 "window.onunload=function(e){ while(1); };\n")); | 2383 "window.onunload=function(e){ while(1); };\n")); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 web_contents->GetRenderManagerForTesting()->speculative_frame_host()); | 2551 web_contents->GetRenderManagerForTesting()->speculative_frame_host()); |
| 2543 } else { | 2552 } else { |
| 2544 EXPECT_FALSE( | 2553 EXPECT_FALSE( |
| 2545 web_contents->GetRenderManagerForTesting()->pending_frame_host()); | 2554 web_contents->GetRenderManagerForTesting()->pending_frame_host()); |
| 2546 } | 2555 } |
| 2547 | 2556 |
| 2548 ResourceDispatcherHost::Get()->SetDelegate(nullptr); | 2557 ResourceDispatcherHost::Get()->SetDelegate(nullptr); |
| 2549 } | 2558 } |
| 2550 | 2559 |
| 2551 } // namespace content | 2560 } // namespace content |
| OLD | NEW |