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

Unified Diff: chrome/browser/site_details_browsertest.cc

Issue 1495993002: Enforce all subframes to be in the same BrowsingInstance as the parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review. Created 5 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/site_details_browsertest.cc
diff --git a/chrome/browser/site_details_browsertest.cc b/chrome/browser/site_details_browsertest.cc
index 8686a4eec6225778d8f82a69883a9f0af1e4785e..bc202c6546098fcd53d3050f2d7971bf08ba7ddd 100644
--- a/chrome/browser/site_details_browsertest.cc
+++ b/chrome/browser/site_details_browsertest.cc
@@ -1135,8 +1135,8 @@ IN_PROC_BROWSER_TEST_F(
const Extension* extension1 = CreateExtension("Extension One", false);
// Navigate the tab's first iframe to a resource of the extension. The
- // extension iframe will be put in a separate BrowsingInstance (see
- // https://crbug.com/522302) unless in the default process model.
+ // extension iframe will be put in the same BrowsingInstance as it is part
+ // of the frame tree.
content::NavigateIframeToURL(
tab, "child-0", extension1->GetResourceURL("/blank_iframe.html"));
details = new TestMemoryDetails();
@@ -1144,7 +1144,7 @@ IN_PROC_BROWSER_TEST_F(
if (content::AreAllSitesIsolatedForTesting()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
- ElementsAre(Bucket(1, 1), Bucket(4, 1)));
+ ElementsAre(Bucket(5, 1)));
} else if (extensions::IsIsolateExtensionsEnabled()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
@@ -1163,7 +1163,7 @@ IN_PROC_BROWSER_TEST_F(
if (content::AreAllSitesIsolatedForTesting()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
- ElementsAre(Bucket(1, 2), Bucket(4, 1)));
+ ElementsAre(Bucket(1, 1), Bucket(5, 1)));
} else if (extensions::IsIsolateExtensionsEnabled()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
@@ -1174,9 +1174,8 @@ IN_PROC_BROWSER_TEST_F(
ElementsAre(Bucket(1, 2)));
}
- // Navigate the second iframe of the tab to the second extension. This will
- // create a new BrowsingInstance again due to https://crbug.com/522302 for
- // --site-per-process and --isolate-extensions.
+ // Navigate the second iframe of the tab to the second extension. It should
+ // stay in the same BrowsingInstance as the page.
content::NavigateIframeToURL(
tab, "child-1", extension2->GetResourceURL("/blank_iframe.html"));
details = new TestMemoryDetails();
@@ -1184,7 +1183,7 @@ IN_PROC_BROWSER_TEST_F(
if (content::AreAllSitesIsolatedForTesting()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
- ElementsAre(Bucket(1, 3), Bucket(3, 1)));
+ ElementsAre(Bucket(1, 1), Bucket(5, 1)));
} else if (extensions::IsIsolateExtensionsEnabled()) {
EXPECT_THAT(details->uma()->GetAllSamples(
"SiteIsolation.SiteInstancesPerBrowsingInstance"),
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698