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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2528813002: Fix Self-Referencing OOPIF Infinite Loop (Closed)
Patch Set: add fix to find and renderframe tests Created 4 years 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
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 71b1dcbbd9740ba1a18474acc817beba9c2d4e32..4d67b814e32e274232d9e0a5c61b6db75f4a831d 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -8979,4 +8979,34 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
EXPECT_TRUE(rvh->is_active());
}
+// Ensure that loading a page with a cross-site coreferencing iframe
+// does not cause an infinite number of nested iframes to be created.
+// TODO(davidsac): This test should be broken until issue 650332 is resolved.
+// Also, a decision of how to handle the issue will determine what FrameTree
+// string to expect
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CoReferencingFrames) {
alexmos 2016/12/28 00:25:59 This test looks identical to the one above in Rend
davidsac (gone - try alexmos) 2017/01/06 00:44:58 It has been removed. :) I think when I first wrot
+ // Load a page with a cross-site coreferencing iframe.
+ GURL url_1(
+ embedded_test_server()->GetURL("a.com", "/coreferencingframe_1.html"));
+ EXPECT_TRUE(NavigateToURL(shell(), url_1));
+
+ FrameTreeNode* root = web_contents()->GetFrameTree()->root();
+
+ // The Frame Tree contains two successful instances of each site plus an
+ // unsuccessfully-navigated third instance of B with a blank URL.
+ EXPECT_EQ(
+ " Site A ------------ proxies for B\n"
+ " +--Site B ------- proxies for A\n"
+ " +--Site A -- proxies for B\n"
+ " +--Site B -- proxies for A\n"
+ " +--Site B -- proxies for A\n"
+ "Where A = http://a.com/\n"
+ " B = http://b.com/",
+ DepictFrameTree(root));
+
+ EXPECT_EQ(
+ root->child_at(0)->child_at(0)->child_at(0)->child_at(0)->current_url(),
+ "");
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698