security/manager/ssl/tests/mochitest/mixedcontent/test_cssContent2.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/tests/mochitest/mixedcontent/test_cssContent2.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>CSS conent styling 2</title>
     1.8 +  <script type="text/javascript" src="/MochiKit/Base.js"></script>
     1.9 +  <script type="text/javascript" src="/MochiKit/DOM.js"></script>
    1.10 +  <script type="text/javascript" src="/MochiKit/Style.js"></script>
    1.11 +  <script type="text/javascript" src="/MochiKit/Signal.js"></script>
    1.12 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <script type="text/javascript" src="mixedContentTest.js"></script>
    1.14 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.15 +
    1.16 +  <script class="testbody" type="text/javascript">
    1.17 +
    1.18 +  if (navigator.platform.startsWith("Mac")) {
    1.19 +    SimpleTest.expectAssertions(0, 1);
    1.20 +  }
    1.21 +
    1.22 +  function runTest()
    1.23 +  {
    1.24 +    isSecurityState("secure");
    1.25 +    document.getElementById("para").style.content =
    1.26 +      "url('http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg')";
    1.27 +
    1.28 +    waitForSecurityState("broken", function()
    1.29 +    {
    1.30 +      isSecurityState("broken", "insecure content added by styling breaks security");
    1.31 +      finish();
    1.32 +    });
    1.33 +  }
    1.34 +
    1.35 +  function afterNavigationTest()
    1.36 +  {
    1.37 +    is(document.getElementById("para").style.content, "");
    1.38 +    isSecurityState("secure", "security full after navigation");
    1.39 +    finish();
    1.40 +  }
    1.41 +
    1.42 +  </script>
    1.43 +</head>
    1.44 +
    1.45 +<body>
    1.46 +  <p id="para"></p>
    1.47 +</body>
    1.48 +</html>

mercurial