| # 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_JavaScriptBlockedForUrls" |
| ATTRIBUTES = "suite:regression" |
| SUITE = "regression" |
| TIME = "SHORT" |
| TEST_CATEGORY = "General" |
| TEST_CLASS = "enterprise" |
| TEST_TYPE = "client" |
| |
| DOC = """ |
| Verify effects of JavaScriptBlockedForUrls policy on client behavior. |
| |
| This test verifies the effect of the JavaScriptBlockedForUrls user policy on |
| Chrome OS client behavior when user policy DefaultJavaScriptSetting=1, meaning |
| allow JavaScript on all pages except for those in JavaScriptBlockedForUrls. |
| It exercises a range of policy values using four unique named test cases: |
| NotSet_AllowJS, SingleUrl_BlockJS, MultipleUrls_AllowJS, and |
| MultipleUrls_BlockJS. See the test file for a full description of what each |
| test case does. |
| |
| In general, a test shall pass if the browser blocks JavaScript execution only |
| on a test page with a URL that matches one or more of the URL patterns listed |
| in JavaScriptBlockedForUrls. A test shall fail if the browser allows execution |
| on a page where it should be blocked, or blocks execution on a page where it |
| should be allowed. |
| |
| Usage example: |
| $ test_that <IPAddress> JavaScriptBlockedForUrls --args="mode=single |
| case=SingleUrl_BlockJS env=cr-dev username=test@crosqa4.com password=test0000" |
| |
| Runs a single test case (e.g., SingleUrl_BlockJS) against a device with the |
| specified IP address, using the Staging environment on the cros-dev DM Server, |
| and signing in to the device with the given username and password. |
| |
| """ |
| |
| job.run_test("policy_JavaScriptBlockedForUrls", args=args) |