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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1123233005: Simplify frame loads in OriginReplication and SandboxFlagsReplication tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index df9e55e8e8f68da3fa981b8a8fa6ae1b7c02b486..7e0a4e39ecadb4afc4fd29ee550dc655a10cb950 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -1426,16 +1426,10 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, OriginReplication) {
TestNavigationObserver observer(shell()->web_contents());
// Navigate the first subframe to a cross-site page with two subframes.
- // NavigateFrameToURL can't be used here because it doesn't guarantee that
- // FrameTreeNodes will have been created for child frames when it returns.
- RenderFrameHostCreatedObserver frame_observer(shell()->web_contents(), 4);
GURL foo_url(
embedded_test_server()->GetURL("foo.com", "/frame_tree/1-1.html"));
- NavigationController::LoadURLParams params(foo_url);
- params.transition_type = ui::PAGE_TRANSITION_LINK;
- params.frame_tree_node_id = root->child_at(0)->frame_tree_node_id();
- root->child_at(0)->navigator()->GetController()->LoadURLWithParams(params);
- frame_observer.Wait();
+ NavigateFrameToURL(root->child_at(0), foo_url);
+ EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
// We can't use a TestNavigationObserver to verify the URL here,
// since the frame has children that may have clobbered it in the observer.
@@ -1512,13 +1506,11 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, SandboxFlagsReplication) {
TestNavigationObserver observer(shell()->web_contents());
// Navigate the second (sandboxed) subframe to a cross-site page with a
- // subframe. Use RenderFrameHostCreatedObserver to guarantee that all
- // FrameTreeNodes are created for child frames.
- RenderFrameHostCreatedObserver frame_observer(shell()->web_contents(), 4);
+ // subframe.
GURL foo_url(
embedded_test_server()->GetURL("foo.com", "/frame_tree/1-1.html"));
NavigateFrameToURL(root->child_at(1), foo_url);
- frame_observer.Wait();
+ EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
// We can't use a TestNavigationObserver to verify the URL here,
// since the frame has children that may have clobbered it in the observer.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698