Commit 35264e31 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Adjust test expectations - site-per-process is no longer differs on official bots

r584254 removed differences between waterfall/cq and official bots
(by removing testing/variations/fieldtrial_testing_config.json entries
related to site-per-process and making site-per-process the default
even in absence of field trials).  This makes it possible to remove
the |#if defined(OFFICIAL_BUILD)|-related expectations from
WebDriverSitePerProcessPolicyBrowserTest.

r581059 removed the not_site_per_process_browser_tests step from the bots.
This makes it possible to remove the kDisableSiteIsolationTrials-related
expectations from WebDriverSitePerProcessPolicyBrowserTest

Bug: 874998
Tbr: pastarmovj@chromium.org
Change-Id: I87988884dfe945f16e10680637b26fb4efcf3f2c
Reviewed-on: https://chromium-review.googlesource.com/1181526
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584494}
parent a286b1bb
...@@ -116,31 +116,9 @@ class IsolateOriginsPolicyBrowserTest : public SiteIsolationPolicyBrowserTest { ...@@ -116,31 +116,9 @@ class IsolateOriginsPolicyBrowserTest : public SiteIsolationPolicyBrowserTest {
class WebDriverSitePerProcessPolicyBrowserTest class WebDriverSitePerProcessPolicyBrowserTest
: public SitePerProcessPolicyBrowserTestEnabled { : public SitePerProcessPolicyBrowserTestEnabled {
protected: protected:
WebDriverSitePerProcessPolicyBrowserTest() WebDriverSitePerProcessPolicyBrowserTest() = default;
: are_sites_isolated_for_testing_(false) {}
void SetUpInProcessBrowserTestFixture() override { void SetUpInProcessBrowserTestFixture() override {
// First take note if tests are running in site isolated environment as this
// will change the outcome of the test. We can't just call this method after
// the call to the base setup method because setting the Site Isolation
// policy is indistinguishable from setting the the command line flag
// 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_ =
!base::CommandLine::ForCurrentProcess()->HasSwitch(
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
// renderer via a command-line. Setting the policy in the test itself or in // renderer via a command-line. Setting the policy in the test itself or in
...@@ -156,8 +134,6 @@ class WebDriverSitePerProcessPolicyBrowserTest ...@@ -156,8 +134,6 @@ class WebDriverSitePerProcessPolicyBrowserTest
provider_.UpdateChromePolicy(values); provider_.UpdateChromePolicy(values);
} }
bool are_sites_isolated_for_testing_;
private: private:
DISALLOW_COPY_AND_ASSIGN(WebDriverSitePerProcessPolicyBrowserTest); DISALLOW_COPY_AND_ASSIGN(WebDriverSitePerProcessPolicyBrowserTest);
}; };
...@@ -200,8 +176,8 @@ IN_PROC_BROWSER_TEST_F(IsolateOriginsPolicyBrowserTest, Simple) { ...@@ -200,8 +176,8 @@ IN_PROC_BROWSER_TEST_F(IsolateOriginsPolicyBrowserTest, Simple) {
IN_PROC_BROWSER_TEST_F(WebDriverSitePerProcessPolicyBrowserTest, Simple) { IN_PROC_BROWSER_TEST_F(WebDriverSitePerProcessPolicyBrowserTest, Simple) {
Expectations expectations[] = { Expectations expectations[] = {
{"https://foo.com/noodles.html", are_sites_isolated_for_testing_}, {"https://foo.com/noodles.html", true},
{"http://example.org/pumpkins.html", are_sites_isolated_for_testing_}, {"http://example.org/pumpkins.html", true},
}; };
CheckExpectations(expectations, arraysize(expectations)); CheckExpectations(expectations, arraysize(expectations));
} }
......
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