content/base/test/csp/test_subframe_run_js_if_allowed.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=702439
     6 This test verifies that child iframes of CSP documents are
     7 permitted to execute javascript: URLs assuming the policy
     8 allows this.
     9 -->
    10 <head>
    11   <title>Test for Bug 702439</title>
    12   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    13   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    14 </head>
    15 <body>
    16 <script class="testbody" type="text/javascript">
    17 var javascript_link_ran = false;
    19 // check that the script in the child frame's javascript: URL ran
    20 function checkResult()
    21 {
    22   is(javascript_link_ran, true,
    23      "javascript URL didn't execute");
    25   SimpleTest.finish();
    26 }
    28 SimpleTest.waitForExplicitFinish();
    29 </script>
    30 <iframe id="i" src="file_subframe_run_js_if_allowed.html"></iframe>
    31 </body>
    32 </html>

mercurial