content/base/test/csp/file_bug886164_5.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head> <meta charset="utf-8"> </head>
     4 <script type="text/javascript">
     5   function ok(result, desc) {
     6     window.parent.postMessage({ok: result, desc: desc}, "*");
     7   }
     9   function doStuff() {
    10     ok(true, "documents sandboxed with allow-scripts should be able to run inline scripts");
    11   }
    12 </script>
    13 <script src='file_iframe_sandbox_pass.js'></script>
    14 <body onLoad='ok(true, "documents sandboxed with allow-scripts should be able to run script from event listeners");doStuff();'>
    15   I am sandboxed but with only inline "allow-scripts"
    17  <!-- sandbox="allow-scripts" -->
    18  <!-- Content-Security-Policy: default-src 'none' 'unsafe-inline'-->
    20  <!-- these should be stopped by CSP -->
    21  <img src="/tests/content/base/test/csp/file_CSP.sjs?testid=img5_bad&type=img/png" />
    22  <img src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=img5a_bad&type=img/png"> </img>
    23  <script src='/tests/content/base/test/csp/file_CSP.sjs?testid=script5_bad&type=text/javascript'></script>
    24  <script src='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=script5a_bad&type=text/javascript'></script>
    25 </body>
    26 </html>

mercurial