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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2448503002: Revert of Do not hide the old RenderWidgetHostView when commiting a navigation. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8504 matching lines...) Expand 10 before | Expand all | Expand 10 after
8515 // |popup2|. This is allowed since the main tab is |popup2|'s opener. 8515 // |popup2|. This is allowed since the main tab is |popup2|'s opener.
8516 EXPECT_TRUE(NavigateToURL(shell(), b_url)); 8516 EXPECT_TRUE(NavigateToURL(shell(), b_url));
8517 8517
8518 base::string16 expected_title(base::UTF8ToUTF16("foo")); 8518 base::string16 expected_title(base::UTF8ToUTF16("foo"));
8519 TitleWatcher title_watcher(popup2->web_contents(), expected_title); 8519 TitleWatcher title_watcher(popup2->web_contents(), expected_title);
8520 EXPECT_TRUE(ExecuteScript( 8520 EXPECT_TRUE(ExecuteScript(
8521 shell(), "window.open('','popup2').postMessage('foo', '*');")); 8521 shell(), "window.open('','popup2').postMessage('foo', '*');"));
8522 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 8522 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
8523 } 8523 }
8524 8524
8525 // This tests that we don't hide the RenderViewHost when reusing the
8526 // RenderViewHost for a subframe. See https://crbug.com/638375.
8527 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ReusedRenderViewNotHidden) {
8528 GURL a_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
8529 GURL b_url_a_subframe(embedded_test_server()->GetURL(
8530 "b.com", "/cross_site_iframe_factory.html?b(a)"));
8531
8532 EXPECT_TRUE(NavigateToURL(shell(), a_url));
8533
8534 // Open a popup in a.com.
8535 Shell* popup = OpenPopup(shell(), a_url, "popup");
8536
8537 // Navigate this popup to b.com with an a.com subframe.
8538 EXPECT_TRUE(NavigateToURL(popup, b_url_a_subframe));
8539
8540 FrameTreeNode* root = static_cast<WebContentsImpl*>(popup->web_contents())
8541 ->GetFrameTree()
8542 ->root();
8543 FrameTreeNode* child_node = root->child_at(0);
8544
8545 EXPECT_FALSE(child_node->current_frame_host()
8546 ->render_view_host()
8547 ->GetWidget()
8548 ->is_hidden());
8549 }
8550
8551 } // namespace content 8525 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698