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

Unified Diff: content/browser/frame_host/render_frame_host_manager_browsertest.cc

Issue 2093123002: Make RestoreSubframeFileAccessForHistoryNavigation pass in OOPIF modes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test expectations. Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing/buildbot/filters/isolate-extensions.content_browsertests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 6100a740016ec2b664e56497ebca650c637a049f..41740c4247bc186857ef7a8c0e3a3bddf2a3af54 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -2015,6 +2015,18 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
// Disable the swap out timer so we wait for the UpdateState message.
root->current_frame_host()->DisableSwapOutTimerForTesting();
+ // Do an in-page navigation in the child to make sure we hear a PageState with
+ // the chosen file before the subframe's FrameTreeNode is deleted. In
+ // practice, we'll get the PageState 1 second after the file is chosen.
+ // TODO(creis): Remove this in-page navigation once we keep track of
+ // FrameTreeNodes that are pending deletion. See https://crbug.com/609963.
+ {
+ TestNavigationObserver nav_observer(shell()->web_contents());
+ std::string script = "location.href='#foo';";
+ EXPECT_TRUE(ExecuteScript(root->child_at(0), script));
+ nav_observer.Wait();
+ }
+
// Navigate to a different process without access to the file, and wait for
// the old process to exit.
RenderProcessHostWatcher exit_observer(
@@ -2036,7 +2048,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
// Go back, ending up in a different RenderProcessHost than before.
TestNavigationObserver back_nav_load_observer(shell()->web_contents());
- shell()->web_contents()->GetController().GoBack();
+ shell()->web_contents()->GetController().GoToIndex(0);
back_nav_load_observer.Wait();
EXPECT_NE(process_id,
shell()->web_contents()->GetRenderProcessHost()->GetID());
« no previous file with comments | « no previous file | testing/buildbot/filters/isolate-extensions.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698