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