content/base/test/csp/file_CSP_bug941404.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/csp/file_CSP_bug941404.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<html>
     1.5 +<head> <meta charset="utf-8"> </head>
     1.6 +  <body>
     1.7 +
     1.8 +    <!-- this should be allowed (no CSP)-->
     1.9 +    <img src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=img_good&type=img/png"> </img>
    1.10 +
    1.11 +
    1.12 +    <script type="text/javascript">
    1.13 +      var req = new XMLHttpRequest();
    1.14 +      req.onload = function() {
    1.15 +        //this should be allowed (no CSP)
    1.16 +        try {
    1.17 +        var img = document.createElement("img");
    1.18 +        img.src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=img2_good&type=img/png";
    1.19 +        document.body.appendChild(img);
    1.20 +        } catch(e) {
    1.21 +          console.log("yo: "+e);
    1.22 +        }
    1.23 +      };
    1.24 +      req.open("get", "file_CSP_bug941404_xhr.html", true);
    1.25 +      req.responseType = "document";
    1.26 +      req.send();
    1.27 +    </script>
    1.28 +
    1.29 +  </body>
    1.30 +</html>

mercurial