Remove autotest for deprecated policies.

PluginsAllowedForUrls,PluginsBlockedForUrls were deprecated in M87.

This CL removes test files.

Change-Id: Ib027e7f97d9e758ceae0988e94fbd1d37202bdd0
Bug:1083496
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2517564
Reviewed-by: Gabor Zsolt Magda <gabormagda@google.com>
Reviewed-by: Illia Klimov <elklm@google.com>
Reviewed-by: Derek Beckett <dbeckett@chromium.org>
Tested-by: Illia Klimov <elklm@google.com>
Auto-Submit: Illia Klimov <elklm@google.com>
Commit-Queue: Derek Beckett <dbeckett@chromium.org>
diff --git a/client/site_tests/policy_PluginsAllowedForUrls/control b/client/site_tests/policy_PluginsAllowedForUrls/control
deleted file mode 100644
index 5d2f290..0000000
--- a/client/site_tests/policy_PluginsAllowedForUrls/control
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsAllowedForUrls'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effect of PluginsAllowedForUrls policy on Chrome OS behavior.
-
-This test verifies the effect of the PluginsAllowedForUrls user policy on
-Chrome OS client behavior, when DefaultPluginsSetting=2 (Block Plugins). It
-exercises all valid policy values across three test cases:
-SiteAllowed_Run, SiteNotAllowed_Block, and NotSet_Block.
-
-This default control file allows CloudDPC E2E tests to run any test case
-defined in this test via command-line.
-'''
-
-args_dict = utils.args_to_dict(args)
-
-job.run_test('policy_PluginsAllowedForUrls', **args_dict)
diff --git a/client/site_tests/policy_PluginsAllowedForUrls/control.notset_block b/client/site_tests/policy_PluginsAllowedForUrls/control.notset_block
deleted file mode 100644
index 06f8378..0000000
--- a/client/site_tests/policy_PluginsAllowedForUrls/control.notset_block
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsAllowedForUrls.notset_block'
-ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsAllowedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when the
-PluginsAllowedForUrls user policy is not set, and DefaultPluginsSetting=2
-(Block Plugins).
-
-'''
-
-job.run_test('policy_PluginsAllowedForUrls', case='NotSet_Block')
diff --git a/client/site_tests/policy_PluginsAllowedForUrls/control.siteallowed_run b/client/site_tests/policy_PluginsAllowedForUrls/control.siteallowed_run
deleted file mode 100644
index 9cccdbd..0000000
--- a/client/site_tests/policy_PluginsAllowedForUrls/control.siteallowed_run
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsAllowedForUrls.siteallowed_run'
-ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsAllowedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when user
-policy PluginsAllowedForUrls contains URLs with one whose domain matches
-the page that uses a plugin, and DefaultPluginsSetting=2 (Block Plugins).
-
-'''
-
-job.run_test('policy_PluginsAllowedForUrls', case='SiteAllowed_Run')
diff --git a/client/site_tests/policy_PluginsAllowedForUrls/control.sitenotallowed_block b/client/site_tests/policy_PluginsAllowedForUrls/control.sitenotallowed_block
deleted file mode 100644
index 7f9a0a7..0000000
--- a/client/site_tests/policy_PluginsAllowedForUrls/control.sitenotallowed_block
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsAllowedForUrls.sitenotallowed_block'
-ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsAllowedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when user
-policy PluginsAllowedForUrls contains URLs whose domains do not match the page
-that uses a plugin, and DefaultPluginsSetting=2 (Block Plugins).
-
-'''
-
-job.run_test('policy_PluginsAllowedForUrls', case='SiteNotAllowed_Block')
diff --git a/client/site_tests/policy_PluginsAllowedForUrls/policy_PluginsAllowedForUrls.py b/client/site_tests/policy_PluginsAllowedForUrls/policy_PluginsAllowedForUrls.py
deleted file mode 100644
index 90684d9..0000000
--- a/client/site_tests/policy_PluginsAllowedForUrls/policy_PluginsAllowedForUrls.py
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-import utils
-
-from autotest_lib.client.common_lib import error
-from autotest_lib.client.cros.enterprise import enterprise_policy_base
-from autotest_lib.client.cros.audio import audio_helper
-
-
-class policy_PluginsAllowedForUrls(
-        enterprise_policy_base.EnterprisePolicyTest):
-    """
-    Test PluginsAllowedForUrls policy effect on CrOS behavior.
-
-    This test verifies the behavior of Chrome OS with a set of valid values
-    for the PluginsAllowedForUrls user policy, when DefaultPluginsSetting=2
-    (i.e., block running of plugins by default, except on sites listed in
-    PluginsAllowedForUrls). These valid values are covered by 3 test cases:
-    SiteAllowed_Run, SiteNotAllowed_Block, NotSet_Block.
-
-    When the policy value is None (as in case NotSet_Block), then running of
-    plugins is blocked on every site. When the value is set to one or more
-    URLs (as in SiteAllowed_Run and SiteNotAllowed_Block), plugins are blocked
-    on every site except for those sites whose domain matches any of the
-    listed URLs.
-
-    A related test, policy_PluginsBlockedForUrls, has DefaultPluginsSetting=1
-    (i.e., allow running of plugins by default, except on sites in domains
-    listed in PluginsBlockedForUrls).
-
-    """
-    version = 1
-
-    def initialize(self, **kwargs):
-        """
-        Initialize this test.
-
-        """
-        self._initialize_test_constants()
-        super(policy_PluginsAllowedForUrls, self).initialize(**kwargs)
-        self.start_webserver()
-
-
-    def _initialize_test_constants(self):
-        """
-        Initialize test-specific constants, some from class constants.
-
-        """
-        self.POLICY_NAME = 'PluginsAllowedForUrls'
-        self.TEST_FILE = 'plugin_status.html'
-        self.TEST_URL = '%s/%s' % (self.WEB_HOST, self.TEST_FILE)
-        self.INCLUDES_ALLOWED_URL = ['http://www.bing.com', self.WEB_HOST,
-                                     'https://www.yahoo.com']
-        self.EXCLUDES_ALLOWED_URL = ['http://www.bing.com',
-                                     'https://www.irs.gov/',
-                                     'https://www.yahoo.com']
-        self.TEST_CASES = {
-            'SiteAllowed_Run': self.INCLUDES_ALLOWED_URL,
-            'SiteNotAllowed_Block': self.EXCLUDES_ALLOWED_URL,
-            'NotSet_Block': None
-        }
-        self.SUPPORTING_POLICIES = {
-            'DefaultPluginsSetting': 2,
-            'AllowOutdatedPlugins': False,
-        }
-
-
-    def _wait_for_page_ready(self, tab):
-        """
-        Wait for JavaScript on page in |tab| to set the pageReady flag.
-
-        @param tab: browser tab with page to load.
-
-        """
-        utils.poll_for_condition(
-            lambda: tab.EvaluateJavaScript('pageReady'),
-            exception=error.TestError('Test page is not ready.'))
-
-
-    def _stop_flash_if_running(self, timeout_sec=10):
-        """
-        Terminate all Flash processes.
-
-        @param timeout_sec: maximum seconds to wait for processes to die.
-        @raises: error.AutoservPidAlreadyDeadError if Flash process is dead.
-        @raises: utils.TimeoutError if Flash processes are still running
-                 after timeout_sec.
-
-        """
-        def kill_flash_process():
-            """
-            Kill all running flash processes.
-
-            """
-            pids = utils.get_process_list('chrome', '--type=ppapi')
-            for pid in pids:
-                try:
-                    utils.nuke_pid(int(pid))
-                except error.AutoservPidAlreadyDeadError:
-                    pass
-            return pids
-
-        # Wait for kill_flash_process to kill all flash processes
-        utils.poll_for_condition(lambda: not kill_flash_process(),
-                                 timeout=timeout_sec)
-
-
-    def _is_flash_running(self):
-        """
-        Check if a Flash process is running.
-
-        @returns: True if one or more flash processes are running.
-
-        """
-        try:
-            utils.poll_for_condition(
-                    lambda: utils.get_process_list('chrome', '--type=ppapi'))
-        except utils.TimeoutError:
-            return False
-
-        return True
-
-
-    def _test_plugins_allowed_for_urls(self, policy_value):
-        """
-        Verify CrOS enforces the PluginsAllowedForUrls policy.
-
-        When PluginsAllowedForUrls is undefined, plugins shall be blocked on
-        all pages. When PluginsAllowedForUrls contains one or more URLs,
-        plugins shall be allowed only on the pages whose domain matches any of
-        the listed URLs.
-
-        @param policy_value: policy value expected.
-
-        """
-        # Set a low audio volume to avoid annoying people during tests.
-        audio_helper.set_volume_levels(10, 100)
-
-        # Kill any running Flash processes.
-        self._stop_flash_if_running()
-
-        # Open page with an embedded flash file.
-        tab = self.navigate_to_url(self.TEST_URL)
-        self._wait_for_page_ready(tab)
-
-        # Check if Flash process is running.
-        plugin_is_running = self._is_flash_running()
-        logging.info('plugin_is_running: %r', plugin_is_running)
-
-        # String |WEB_HOST| will be found in string |policy_value| for
-        # cases that expect the plugin to be run.
-        if policy_value is not None and self.WEB_HOST in policy_value:
-            if not plugin_is_running:
-                raise error.TestFail('Plugins should run.')
-        else:
-            if plugin_is_running:
-                raise error.TestFail('Plugins should not run.')
-        tab.Close()
-
-
-    def run_once(self, case):
-        """
-        Setup and run the test configured for the specified test case.
-
-        @param case: Name of the test case to run.
-
-        """
-        case_value = self.TEST_CASES[case]
-        self.SUPPORTING_POLICIES[self.POLICY_NAME] = case_value
-        self.setup_case(user_policies=self.SUPPORTING_POLICIES)
-        self._test_plugins_allowed_for_urls(case_value)
diff --git a/client/site_tests/policy_PluginsBlockedForUrls/control b/client/site_tests/policy_PluginsBlockedForUrls/control
deleted file mode 100644
index 7cedb8d..0000000
--- a/client/site_tests/policy_PluginsBlockedForUrls/control
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsBlockedForUrls'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effect of PluginsBlockedForUrls policy on Chrome OS behavior.
-
-This test verifies the effect of the PluginsBlockedForUrls user policy on
-Chrome OS client behavior, when DefaultPluginsSetting=1 (Allow Plugins). It
-exercises all valid policy values across three test cases: SiteBlocked_Block,
-SiteNotBlocked_Run, and NotSet_Block.
-
-This default control file allows CloudDPC E2E tests to run any test case
-defined in this test via command-line.
-'''
-
-args_dict = utils.args_to_dict(args)
-
-job.run_test('policy_PluginsBlockedForUrls', **args_dict)
diff --git a/client/site_tests/policy_PluginsBlockedForUrls/control.notset_run b/client/site_tests/policy_PluginsBlockedForUrls/control.notset_run
deleted file mode 100644
index 2f7554f..0000000
--- a/client/site_tests/policy_PluginsBlockedForUrls/control.notset_run
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsBlockedForUrls.notset_run'
-# TODO crbug.com/712394: reenable this test
-# ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsBlockedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when the
-PluginsBlockedForUrls user policy is not set, and DefaultPluginsSetting=1
-(Allow Plugins).
-
-'''
-
-job.run_test('policy_PluginsBlockedForUrls', case='NotSet_Run')
diff --git a/client/site_tests/policy_PluginsBlockedForUrls/control.siteblocked_block b/client/site_tests/policy_PluginsBlockedForUrls/control.siteblocked_block
deleted file mode 100644
index a7a826c..0000000
--- a/client/site_tests/policy_PluginsBlockedForUrls/control.siteblocked_block
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsBlockedForUrls.siteblocked_block'
-# TODO crbug.com/712394: reenable this test
-# ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsBlockedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when user
-policy PluginsBlockedForUrls contains URLs with one whose domain matches
-the page that uses a plugin, and DefaultPluginsSetting=1 (Allow Plugins).
-
-'''
-
-job.run_test('policy_PluginsBlockedForUrls', case='SiteBlocked_Block')
diff --git a/client/site_tests/policy_PluginsBlockedForUrls/control.sitenotblocked_run b/client/site_tests/policy_PluginsBlockedForUrls/control.sitenotblocked_run
deleted file mode 100644
index ea7ec76..0000000
--- a/client/site_tests/policy_PluginsBlockedForUrls/control.sitenotblocked_run
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = 'scunningham'
-NAME = 'policy_PluginsBlockedForUrls.sitenotblocked_run'
-# TODO crbug.com/712394: reenable this test
-# ATTRIBUTES = 'suite:ent-nightly, suite:policy'
-TIME = 'SHORT'
-TEST_CATEGORY = 'General'
-TEST_CLASS = 'enterprise'
-TEST_TYPE = 'client'
-
-DOC = '''
-Verify effects of PluginsBlockedForUrls policy.
-
-This test case verifies the behavior and appearance of Chrome OS when user
-policy PluginsBlockedForUrls contains URLs whose domains do not match the page
-that uses a plugin, and DefaultPluginsSetting=1 (Allow Plugins).
-
-'''
-
-job.run_test('policy_PluginsBlockedForUrls', case='SiteNotBlocked_Run')
diff --git a/client/site_tests/policy_PluginsBlockedForUrls/policy_PluginsBlockedForUrls.py b/client/site_tests/policy_PluginsBlockedForUrls/policy_PluginsBlockedForUrls.py
deleted file mode 100644
index 047512e..0000000
--- a/client/site_tests/policy_PluginsBlockedForUrls/policy_PluginsBlockedForUrls.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 2016 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-import utils
-
-from autotest_lib.client.common_lib import error
-from autotest_lib.client.cros.enterprise import enterprise_policy_base
-from autotest_lib.client.cros.audio import audio_helper
-
-
-class policy_PluginsBlockedForUrls(
-        enterprise_policy_base.EnterprisePolicyTest):
-    """Test PluginsBlockedForUrls policy effect on CrOS behavior.
-
-    This test verifies the behavior of Chrome OS with a set of valid values
-    for the PluginsBlockedForUrls user policy, when DefaultPluginsSetting=1
-    (i.e., allow running of plugins by default, except on sites listed in
-    PluginsBlockedForUrls). These valid values are covered by 3 test cases:
-    SiteBlocked_Block, SiteNotBlocked_Run, and NotSet_Run.
-
-    This test is also configured with DisablePluginFinder=True and
-    AllowOutdatedPlugins=False.
-
-    When the policy value is None (as in case NotSet_Run), then running of
-    plugins is allowed on every site. When the value is set to one or more
-    URLs (as in SiteBlocked_Block and SiteNotBlocked_Run), plugins are run
-    on every site except for those sites whose domain matches any of the
-    listed URLs.
-
-    A related test, policy_PluginsBlockedForUrls, has DefaultPluginsSetting=2
-    (i.e., block running of plugins by default, except on sites in domains
-    listed in PluginsAllowedForUrls).
-    """
-    version = 1
-
-    def initialize(self, **kwargs):
-        """Initialize this test."""
-        self._initialize_test_constants()
-        super(policy_PluginsBlockedForUrls, self).initialize(**kwargs)
-        self.start_webserver()
-
-
-    def _initialize_test_constants(self):
-        """Initialize test-specific constants, some from class constants."""
-        self.POLICY_NAME = 'PluginsBlockedForUrls'
-        self.TEST_FILE = 'plugin_status.html'
-        self.TEST_URL = '%s/%s' % (self.WEB_HOST, self.TEST_FILE)
-        self.INCLUDES_BLOCKED_URL = ['http://www.bing.com', self.WEB_HOST,
-                                     'https://www.yahoo.com']
-        self.EXCLUDES_BLOCKED_URL = ['http://www.bing.com',
-                                     'https://www.irs.gov/',
-                                     'https://www.yahoo.com']
-        self.TEST_CASES = {
-            'SiteBlocked_Block': self.INCLUDES_BLOCKED_URL,
-            'SiteNotBlocked_Run': self.EXCLUDES_BLOCKED_URL,
-            'NotSet_Run': None
-        }
-        self.STARTUP_URLS = ['chrome://policy', 'chrome://settings']
-        self.SUPPORTING_POLICIES = {
-            'DefaultPluginsSetting': 1,
-            'DisablePluginFinder': True,
-            'AllowOutdatedPlugins': False,
-            'AlwaysAuthorizePlugins': False,
-            'BookmarkBarEnabled': True,
-            'EditBookmarksEnabled': True,
-            'RestoreOnStartupURLs': self.STARTUP_URLS,
-            'RestoreOnStartup': 4
-        }
-
-
-    def _wait_for_page_ready(self, tab):
-        """Wait for JavaScript on page in |tab| to set the pageReady flag.
-
-        @param tab: browser tab with page to load.
-        """
-        utils.poll_for_condition(
-            lambda: tab.EvaluateJavaScript('pageReady'),
-            exception=error.TestError('Test page is not ready.'))
-
-
-    def _stop_flash_if_running(self, timeout_sec=10):
-        """Terminate all Shockwave Flash processes.
-
-        @param timeout_sec: maximum seconds to wait for processes to die.
-        @raises: error.AutoservPidAlreadyDeadError if Flash process is dead.
-        @raises: utils.TimeoutError if Flash processes are still running
-                 after timeout_sec.
-        """
-        def kill_flash_process():
-            """Kill all running flash processes."""
-            pids = utils.get_process_list('chrome', '--type=ppapi')
-            for pid in pids:
-                try:
-                    utils.nuke_pid(int(pid))
-                except error.AutoservPidAlreadyDeadError:
-                    pass
-            return pids
-
-        utils.poll_for_condition(lambda: kill_flash_process() == [],
-                                 timeout=timeout_sec)
-
-
-    def _is_flash_running(self):
-        """Check if a Shockwave Flash process is running.
-
-        @returns: True if one or more flash processes are running.
-        """
-        flash_pids = utils.get_process_list('chrome', '--type=ppapi')
-        return flash_pids != []
-
-
-    def _test_plugins_blocked_for_urls(self, policy_value):
-        """Verify CrOS enforces the PluginsBlockedForUrls policy.
-
-        When PluginsBlockedForUrls is undefined, plugins shall be run on
-        all pages. When PluginsBlockedForUrls contains one or more URLs,
-        plugins shall be run on all pages except those whose domain matches
-        any of the listed URLs.
-
-        @param policy_value: policy value expected.
-        """
-        # Set a low audio volume to avoid annoying people during tests.
-        audio_helper.set_volume_levels(10, 100)
-
-        # Kill any running Shockwave Flash processes.
-        self._stop_flash_if_running()
-
-        # Open page with an embedded flash file.
-        tab = self.navigate_to_url(self.TEST_URL)
-        self._wait_for_page_ready(tab)
-
-        # Check if Shockwave Flash process is running.
-        plugin_is_running = self._is_flash_running()
-        logging.info('plugin_is_running: %r', plugin_is_running)
-
-        # String |WEB_HOST| will be found in string |policy_value| for
-        # cases that expect the plugin to be run.
-        if policy_value is not None and self.WEB_HOST in policy_value:
-            if plugin_is_running:
-                raise error.TestFail('Plugins should not run.')
-        else:
-            if not plugin_is_running:
-                raise error.TestFail('Plugins should run.')
-        tab.Close()
-
-
-    def run_once(self, case):
-        """Setup and run the test configured for the specified test case.
-
-        @param case: Name of the test case to run.
-        """
-        case_value = self.TEST_CASES[case]
-        self.SUPPORTING_POLICIES[self.POLICY_NAME] = case_value
-        self.setup_case(user_policies=self.SUPPORTING_POLICIES)
-        self._test_plugins_blocked_for_urls(case_value)