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

Side by Side Diff: chrome/browser/site_details_browsertest.cc

Issue 1682253006: Add a control group to the SiteIsolationExtensionsActive. It corresponds to the Disabled group of t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uma3
Patch Set: Set correct upstream Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/chrome_extension_web_contents_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/site_details.h" 5 #include "chrome/browser/site_details.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 switches::kSitePerProcess)) { 1090 switches::kSitePerProcess)) {
1091 group = "SitePerProcessFlag"; 1091 group = "SitePerProcessFlag";
1092 } else if (extensions::IsIsolateExtensionsEnabled()) { 1092 } else if (extensions::IsIsolateExtensionsEnabled()) {
1093 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1093 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1094 extensions::switches::kIsolateExtensions)) { 1094 extensions::switches::kIsolateExtensions)) {
1095 group = "IsolateExtensionsFlag"; 1095 group = "IsolateExtensionsFlag";
1096 } else { 1096 } else {
1097 group = "FieldTrial"; 1097 group = "FieldTrial";
1098 } 1098 }
1099 } else { 1099 } else {
1100 group = "Default"; 1100 if (base::FieldTrialList::FindFullName("SiteIsolationExtensions").empty())
1101 group = "Default";
1102 else
1103 group = "Control";
1101 } 1104 }
1102 1105
1103 EXPECT_TRUE(IsInTrialGroup("SiteIsolationExtensionsActive", group)); 1106 EXPECT_TRUE(IsInTrialGroup("SiteIsolationExtensionsActive", group));
1104 } 1107 }
1105 1108
1106 // Verifies that the UMA counter for SiteInstances in a BrowsingInstance is 1109 // Verifies that the UMA counter for SiteInstances in a BrowsingInstance is
1107 // correct when using tabs with web pages. 1110 // correct when using tabs with web pages.
1108 IN_PROC_BROWSER_TEST_F(SiteDetailsBrowserTest, 1111 IN_PROC_BROWSER_TEST_F(SiteDetailsBrowserTest,
1109 VerifySiteInstanceCountInBrowsingInstance) { 1112 VerifySiteInstanceCountInBrowsingInstance) {
1110 // Page with 14 nested oopifs across 9 sites (a.com through i.com). 1113 // Page with 14 nested oopifs across 9 sites (a.com through i.com).
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 content::NavigateIframeToURL( 1228 content::NavigateIframeToURL(
1226 tab, "child-1", extension2->GetResourceURL("/blank_iframe.html")); 1229 tab, "child-1", extension2->GetResourceURL("/blank_iframe.html"));
1227 details = new TestMemoryDetails(); 1230 details = new TestMemoryDetails();
1228 details->StartFetchAndWait(); 1231 details->StartFetchAndWait();
1229 EXPECT_THAT(details->uma()->GetAllSamples( 1232 EXPECT_THAT(details->uma()->GetAllSamples(
1230 "SiteIsolation.SiteInstancesPerBrowsingInstance"), 1233 "SiteIsolation.SiteInstancesPerBrowsingInstance"),
1231 DependingOnPolicy(ElementsAre(Bucket(1, 2)), 1234 DependingOnPolicy(ElementsAre(Bucket(1, 2)),
1232 ElementsAre(Bucket(1, 1), Bucket(3, 1)), 1235 ElementsAre(Bucket(1, 1), Bucket(3, 1)),
1233 ElementsAre(Bucket(1, 1), Bucket(5, 1)))); 1236 ElementsAre(Bucket(1, 1), Bucket(5, 1))));
1234 } 1237 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_extension_web_contents_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698