tor-browser

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

test_bug1551886.html (978B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <title>Bug 1551886: Opaque documents aren't considered in the mixed content blocker</title>
      5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      7 </head>
      8 
      9 <body>
     10 <script class="testbody" type="text/javascript">
     11 
     12 SimpleTest.waitForExplicitFinish();
     13 
     14 let f = document.createElement("iframe");
     15 f.src = "https://example.com/tests/dom/security/test/mixedcontentblocker/file_bug1551886.html";
     16 
     17 window.addEventListener("message", (event) => {
     18    switch(event.data.type) {
     19        case 'http':
     20            is(event.data.status, "blocked", "nested load of http://example should get blocked by the MCB");
     21            break
     22        case 'https':
     23            is(event.data.status, "loaded", "nested load of https://example should not get blocked by the MCB");
     24            SimpleTest.finish();
     25            break;
     26    }
     27 });
     28 
     29 document.body.appendChild(f); 
     30 
     31 </script>
     32 </body>
     33 </html>