Commit 953d7f91 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Default state of site isolation needs to consider official builds.

WebDriverSitePerProcessPolicyBrowserTest attempts to calculate the
default state of site isolation before the test starts.  This
calculation needs to take into account the official builds, where
testing/variations/fieldtrial_testing_config.json does not apply.

Bug: 836261
Change-Id: I0526969892a39a54a88258d00ee2e66625aa35f8
Reviewed-on: https://chromium-review.googlesource.com/1028227
Commit-Queue: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553977}
parent 062062c3
...@@ -125,9 +125,21 @@ class WebDriverSitePerProcessPolicyBrowserTest ...@@ -125,9 +125,21 @@ class WebDriverSitePerProcessPolicyBrowserTest
// the call to the base setup method because setting the Site Isolation // the call to the base setup method because setting the Site Isolation
// policy is indistinguishable from setting the the command line flag // policy is indistinguishable from setting the the command line flag
// directly. // directly.
#if defined(OFFICIAL_BUILD)
// Official builds still default to no site isolation (i.e. official builds
// are not covered by testing/variations/fieldtrial_testing_config.json).
// See also https://crbug.com/836261.
are_sites_isolated_for_testing_ = false;
#else
// Otherwise, site-per-process is turned on by default, via field trial
// configured with testing/variations/fieldtrial_testing_config.json.
// The only exception is the not_site_per_process_browser_tests step run on
// some trybots - in this step the --disable-site-isolation-trials flag
// counteracts the effects of fieldtrial_testing_config.json.
are_sites_isolated_for_testing_ = are_sites_isolated_for_testing_ =
!base::CommandLine::ForCurrentProcess()->HasSwitch( !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableSiteIsolationTrials); switches::kDisableSiteIsolationTrials);
#endif
// We setup the policy here, because the policy must be 'live' before the // We setup the policy here, because the policy must be 'live' before the
// renderer is created, since the value for this policy is passed to the // renderer is created, since the value for this policy is passed to the
...@@ -186,13 +198,7 @@ IN_PROC_BROWSER_TEST_F(IsolateOriginsPolicyBrowserTest, Simple) { ...@@ -186,13 +198,7 @@ IN_PROC_BROWSER_TEST_F(IsolateOriginsPolicyBrowserTest, Simple) {
CheckExpectations(expectations, arraysize(expectations)); CheckExpectations(expectations, arraysize(expectations));
} }
// Doesn't pass in official builds, see https://crbug.com/836261 IN_PROC_BROWSER_TEST_F(WebDriverSitePerProcessPolicyBrowserTest, Simple) {
#if defined(OFFICIAL_BUILD)
#define MAYBE_Simple DISABLED_Simple
#else
#define MAYBE_Simple Simple
#endif
IN_PROC_BROWSER_TEST_F(WebDriverSitePerProcessPolicyBrowserTest, MAYBE_Simple) {
Expectations expectations[] = { Expectations expectations[] = {
{"https://foo.com/noodles.html", are_sites_isolated_for_testing_}, {"https://foo.com/noodles.html", are_sites_isolated_for_testing_},
{"http://example.org/pumpkins.html", are_sites_isolated_for_testing_}, {"http://example.org/pumpkins.html", are_sites_isolated_for_testing_},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment