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

Unified Diff: chrome/browser/task_manager/task_manager_browsertest.cc

Issue 1039403002: OOPIF: Remove the FrameTreeNode when a RemoteFrame is detached. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable ActiveTab test on FYI bot Created 5 years, 8 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 | content/browser/bad_message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/task_manager_browsertest.cc
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index d923ff12104a24126ef6c64516f74b9131609e3c..f3148ef2cf81b099745278299697d5dde07f343d 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -1094,3 +1094,53 @@ IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest,
ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("aac")));
ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab()));
}
+
+// Tests what happens when a tab does a same-site navigation away from a page
+// with cross-site iframes.
+IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest,
+ LeavePageWithCrossSiteIframes) {
+ ShowTaskManager();
+
+ host_resolver()->AddRule("*", "127.0.0.1");
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+ content::SetupCrossSiteRedirector(embedded_test_server());
+
+ // Navigate the tab to a page on a.com with cross-process subframes.
+ GURL a_dotcom_with_iframes(embedded_test_server()->GetURL(
+ "/cross-site/a.com/iframe_cross_site.html"));
+ browser()->OpenURL(content::OpenURLParams(a_dotcom_with_iframes,
+ content::Referrer(), CURRENT_TAB,
+ ui::PAGE_TRANSITION_TYPED, false));
+
+ ASSERT_NO_FATAL_FAILURE(
+ WaitForTaskManagerRows(1, MatchTab("cross-site iframe test")));
+ ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab()));
+
+ if (!ShouldExpectSubframes()) {
+ ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe()));
+ } else {
+ ASSERT_NO_FATAL_FAILURE(
+ WaitForTaskManagerRows(1, MatchSubframe("http://b.com/")));
+ ASSERT_NO_FATAL_FAILURE(
+ WaitForTaskManagerRows(1, MatchSubframe("http://c.com/")));
+ ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnySubframe()));
+ }
+
+ // Navigate the tab to a page on a.com without cross-process subframes, and
+ // the subframe processes should disappear.
+ GURL a_dotcom_simple(
+ embedded_test_server()->GetURL("/cross-site/a.com/title2.html"));
+ browser()->OpenURL(content::OpenURLParams(a_dotcom_simple,
+ content::Referrer(), CURRENT_TAB,
+ ui::PAGE_TRANSITION_TYPED, false));
+ ASSERT_NO_FATAL_FAILURE(
+ WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness")));
+ ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe()));
+
+ HideTaskManager();
+ ShowTaskManager();
+
+ ASSERT_NO_FATAL_FAILURE(
+ WaitForTaskManagerRows(1, MatchTab("Title Of Awesomeness")));
+ ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchAnySubframe()));
+}
« no previous file with comments | « no previous file | content/browser/bad_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698