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

Side by Side 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 unified diff | Download patch
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 8961 matching lines...) Expand 10 before | Expand all | Expand 10 after
8972 // handler and sends the swapout ACK. 8972 // handler and sends the swapout ACK.
8973 rfh->OnSwappedOut(); 8973 rfh->OnSwappedOut();
8974 8974
8975 // Wait for the new a.com navigation to finish. 8975 // Wait for the new a.com navigation to finish.
8976 back_observer.Wait(); 8976 back_observer.Wait();
8977 8977
8978 // The RVH for a.com should've been reused, and it should be active. 8978 // The RVH for a.com should've been reused, and it should be active.
8979 EXPECT_TRUE(rvh->is_active()); 8979 EXPECT_TRUE(rvh->is_active());
8980 } 8980 }
8981 8981
8982 // Ensure that loading a page with a cross-site coreferencing iframe
8983 // does not cause an infinite number of nested iframes to be created.
8984 // TODO(davidsac): This test should be broken until issue 650332 is resolved.
8985 // Also, a decision of how to handle the issue will determine what FrameTree
8986 // string to expect
8987 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
8988 // Load a page with a cross-site coreferencing iframe.
8989 GURL url_1(
8990 embedded_test_server()->GetURL("a.com", "/coreferencingframe_1.html"));
8991 EXPECT_TRUE(NavigateToURL(shell(), url_1));
8992
8993 FrameTreeNode* root = web_contents()->GetFrameTree()->root();
8994
8995 // The Frame Tree contains two successful instances of each site plus an
8996 // unsuccessfully-navigated third instance of B with a blank URL.
8997 EXPECT_EQ(
8998 " Site A ------------ proxies for B\n"
8999 " +--Site B ------- proxies for A\n"
9000 " +--Site A -- proxies for B\n"
9001 " +--Site B -- proxies for A\n"
9002 " +--Site B -- proxies for A\n"
9003 "Where A = http://a.com/\n"
9004 " B = http://b.com/",
9005 DepictFrameTree(root));
9006
9007 EXPECT_EQ(
9008 root->child_at(0)->child_at(0)->child_at(0)->child_at(0)->current_url(),
9009 "");
9010 }
9011
8982 } // namespace content 9012 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698