• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "scunningham"
6NAME = "policy_JavaScriptBlockedForUrls"
7ATTRIBUTES = "suite:regression"
8SUITE = "regression"
9TIME = "SHORT"
10TEST_CATEGORY = "General"
11TEST_CLASS = "enterprise"
12TEST_TYPE = "client"
13
14DOC = """
15Verify effects of JavaScriptBlockedForUrls policy on client behavior.
16
17This test verifies the effect of the JavaScriptBlockedForUrls user policy on
18Chrome OS client behavior when user policy DefaultJavaScriptSetting=1, meaning
19allow JavaScript on all pages except for those in JavaScriptBlockedForUrls.
20It exercises a range of policy values using four unique named test cases:
21NotSet_AllowJS, SingleUrl_BlockJS, MultipleUrls_AllowJS, and
22MultipleUrls_BlockJS. See the test file for a full description of what each
23test case does.
24
25In general, a test shall pass if the browser blocks JavaScript execution only
26on a test page with a URL that matches one or more of the URL patterns listed
27in JavaScriptBlockedForUrls. A test shall fail if the browser allows execution
28on a page where it should be blocked, or blocks execution on a page where it
29should be allowed.
30
31Usage example:
32$ test_that <IPAddress> JavaScriptBlockedForUrls --args="mode=single
33case=SingleUrl_BlockJS env=cr-dev username=test@crosqa4.com password=test0000"
34
35Runs a single test case (e.g., SingleUrl_BlockJS) against a device with the
36specified IP address, using the Staging environment on the cros-dev DM Server,
37and signing in to the device with the given username and password.
38
39"""
40
41job.run_test("policy_JavaScriptBlockedForUrls", args=args)
42