OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 8640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8651 // Start a URLRequest to the same URL. This should succeed. This would have | 8651 // Start a URLRequest to the same URL. This should succeed. This would have |
8652 // hit the 20 seconds delay before https://crbug.com/657195 was fixed. | 8652 // hit the 20 seconds delay before https://crbug.com/657195 was fixed. |
8653 EXPECT_TRUE(NavigateToURL(shell(), page_url)); | 8653 EXPECT_TRUE(NavigateToURL(shell(), page_url)); |
8654 EXPECT_EQ(page_url, shell()->web_contents()->GetLastCommittedURL()); | 8654 EXPECT_EQ(page_url, shell()->web_contents()->GetLastCommittedURL()); |
8655 | 8655 |
8656 // Note: even if the test fails and for some reason, the test has not timed | 8656 // Note: even if the test fails and for some reason, the test has not timed |
8657 // out by this point, the test teardown code will still hit a DCHECK when it | 8657 // out by this point, the test teardown code will still hit a DCHECK when it |
8658 // calls AssertNoURLRequests() in the shell's URLRequestContext destructor. | 8658 // calls AssertNoURLRequests() in the shell's URLRequestContext destructor. |
8659 } | 8659 } |
8660 | 8660 |
| 8661 // This tests that we don't hide the RenderViewHost when reusing the |
| 8662 // RenderViewHost for a subframe. See https://crbug.com/638375. |
| 8663 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ReusedRenderViewNotHidden) { |
| 8664 GURL a_url(embedded_test_server()->GetURL("a.com", "/title1.html")); |
| 8665 GURL b_url_a_subframe(embedded_test_server()->GetURL( |
| 8666 "b.com", "/cross_site_iframe_factory.html?b(a)")); |
| 8667 |
| 8668 EXPECT_TRUE(NavigateToURL(shell(), a_url)); |
| 8669 |
| 8670 // Open a popup in a.com. |
| 8671 Shell* popup = OpenPopup(shell(), a_url, "popup"); |
| 8672 |
| 8673 // Navigate this popup to b.com with an a.com subframe. |
| 8674 EXPECT_TRUE(NavigateToURL(popup, b_url_a_subframe)); |
| 8675 |
| 8676 FrameTreeNode* root = static_cast<WebContentsImpl*>(popup->web_contents()) |
| 8677 ->GetFrameTree() |
| 8678 ->root(); |
| 8679 FrameTreeNode* child_node = root->child_at(0); |
| 8680 |
| 8681 EXPECT_FALSE(child_node->current_frame_host() |
| 8682 ->render_view_host() |
| 8683 ->GetWidget() |
| 8684 ->is_hidden()); |
| 8685 } |
| 8686 |
8661 } // namespace content | 8687 } // namespace content |
OLD | NEW |