tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug1579094.html (939B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Test if Wildcard CSP supports ExternalProtocol</title>
      5  <!-- Including SimpleTest.js so we can use waitForExplicitFinish !-->
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      8  <meta meta http-equiv="Content-security-policy" content="frame-src SomeExternalProto://*">
      9 </head>
     10 <body>
     11  <p id="display"></p>
     12  <div id="content" style="display: none"></div>
     13 <script class="testbody" type="text/javascript">
     14    SimpleTest.waitForExplicitFinish();
     15 
     16    document.addEventListener("securitypolicyviolation",()=>{
     17        ok(false, "Error: ExternalProtocol Was blocked");
     18        SimpleTest.finish();
     19    });
     20 
     21    window.addEventListener("load", ()=>{
     22        ok(true, "Error: ExternalProtocol was passed");
     23        SimpleTest.finish();
     24    });
     25 </script>
     26 
     27 <iframe src="SomeExternalProto:foo@bar.com">
     28 
     29 
     30 </body>
     31 </html>