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_JavaScriptAllowedForUrls' 7TIME = 'SHORT' 8TEST_CATEGORY = 'General' 9TEST_CLASS = 'enterprise' 10TEST_TYPE = 'client' 11 12DOC = ''' 13Verify effects of JavaScriptAllowedForUrls policy on client behavior. 14 15This test verifies the effect of the JavaScriptAllowedForUrls user policy on 16Chrome OS client behavior when user policy DefaultJavaScriptSetting=2, meaning 17block JavaScript on all pages except for those in JavaScriptAllowedForUrls. 18 19It exercises a range of policy values using four unique test cases: 20NotSet_Block, SingleUrl_Allow, MultipleUrls_Block, and MultipleUrls_Allow. 21See the test file for a full description of what each test case does. 22 23A test case shall pass if the browser allows JavaScript to execute only 24on a test page with a URL that matches one or more of the URL patterns listed 25in JavaScriptAllowedForUrls. A test shall fail if the browser blocks execution 26on a page where it should be allowed, or allows execution on a page where it 27should be blocked. 28 29''' 30 31args_dict = utils.args_to_dict(args) 32 33job.run_test('policy_JavaScriptAllowedForUrls', **args_dict) 34