| # Copyright 2015 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_JavaScriptAllowedForUrls' |
| TIME = 'SHORT' |
| TEST_CATEGORY = 'General' |
| TEST_CLASS = 'enterprise' |
| TEST_TYPE = 'client' |
| |
| DOC = ''' |
| Verify effects of JavaScriptAllowedForUrls policy on client behavior. |
| |
| This test verifies the effect of the JavaScriptAllowedForUrls user policy on |
| Chrome OS client behavior when user policy DefaultJavaScriptSetting=2, meaning |
| block JavaScript on all pages except for those in JavaScriptAllowedForUrls. |
| |
| It exercises a range of policy values using four unique test cases: |
| NotSet_Block, SingleUrl_Allow, MultipleUrls_Block, and MultipleUrls_Allow. |
| See the test file for a full description of what each test case does. |
| |
| A test case shall pass if the browser allows JavaScript to execute only |
| on a test page with a URL that matches one or more of the URL patterns listed |
| in JavaScriptAllowedForUrls. A test shall fail if the browser blocks execution |
| on a page where it should be allowed, or allows execution on a page where it |
| should be blocked. |
| |
| ''' |
| |
| args_dict = utils.args_to_dict(args) |
| |
| job.run_test('policy_JavaScriptAllowedForUrls', **args_dict) |