test_cssContent2.html (1090B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>CSS conent styling 2</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script type="text/javascript" src="mixedContentTest.js"></script> 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 8 9 <script class="testbody" type="text/javascript"> 10 "use strict"; 11 12 if (navigator.platform.startsWith("Mac")) { 13 SimpleTest.expectAssertions(0, 1); 14 } 15 16 async function runTest() 17 { 18 await isSecurityState("secure"); 19 document.getElementById("para").style.content = 20 "url('http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg')"; 21 22 waitForSecurityState("broken", async () => 23 { 24 await isSecurityState("broken", "insecure content added by styling breaks security"); 25 finish(); 26 }); 27 } 28 29 async function afterNavigationTest() 30 { 31 is(document.getElementById("para").style.content, ""); 32 await isSecurityState("secure", "security full after navigation"); 33 finish(); 34 } 35 36 </script> 37 </head> 38 39 <body> 40 <p id="para"></p> 41 </body> 42 </html>