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 8786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8797 load_observer.Wait(); | 8797 load_observer.Wait(); |
8798 | 8798 |
8799 // Ensure that the iframe reuses its parent's process. | 8799 // Ensure that the iframe reuses its parent's process. |
8800 EXPECT_EQ(blank_url, child->current_url()); | 8800 EXPECT_EQ(blank_url, child->current_url()); |
8801 EXPECT_EQ(root->current_frame_host()->GetSiteInstance(), | 8801 EXPECT_EQ(root->current_frame_host()->GetSiteInstance(), |
8802 child->current_frame_host()->GetSiteInstance()); | 8802 child->current_frame_host()->GetSiteInstance()); |
8803 EXPECT_EQ(root->current_frame_host()->GetProcess(), | 8803 EXPECT_EQ(root->current_frame_host()->GetProcess(), |
8804 child->current_frame_host()->GetProcess()); | 8804 child->current_frame_host()->GetProcess()); |
8805 } | 8805 } |
8806 | 8806 |
| 8807 // This tests that we don't hide the RenderViewHost when reusing the |
| 8808 // RenderViewHost for a subframe. See https://crbug.com/638375. |
| 8809 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ReusedRenderViewNotHidden) { |
| 8810 GURL a_url(embedded_test_server()->GetURL("a.com", "/title1.html")); |
| 8811 GURL b_url_a_subframe(embedded_test_server()->GetURL( |
| 8812 "b.com", "/cross_site_iframe_factory.html?b(a)")); |
| 8813 |
| 8814 EXPECT_TRUE(NavigateToURL(shell(), a_url)); |
| 8815 |
| 8816 // Open a popup in a.com. |
| 8817 Shell* popup = OpenPopup(shell(), a_url, "popup"); |
| 8818 |
| 8819 // Navigate this popup to b.com with an a.com subframe. |
| 8820 EXPECT_TRUE(NavigateToURL(popup, b_url_a_subframe)); |
| 8821 |
| 8822 FrameTreeNode* root = static_cast<WebContentsImpl*>(popup->web_contents()) |
| 8823 ->GetFrameTree() |
| 8824 ->root(); |
| 8825 FrameTreeNode* child_node = root->child_at(0); |
| 8826 |
| 8827 EXPECT_FALSE(child_node->current_frame_host() |
| 8828 ->render_view_host() |
| 8829 ->GetWidget() |
| 8830 ->is_hidden()); |
| 8831 } |
| 8832 |
8807 } // namespace content | 8833 } // namespace content |
OLD | NEW |