tor-browser

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

test_unpriv_iframe.html (787B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Ensure unprivilaged document cannot access document.l10n in an iframe</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      8  <script type="application/javascript">
      9  "use strict";
     10  SimpleTest.waitForExplicitFinish();
     11 
     12  addLoadEvent(function() {
     13    let frame = document.getElementById("frame");
     14    let frame2 = document.getElementById("frame2");
     15 
     16    is("l10n" in frame.contentDocument, false);
     17    is("l10n" in frame2.contentDocument, false);
     18  });
     19  addLoadEvent(SimpleTest.finish);
     20  </script>
     21 </head>
     22 <body>
     23  <iframe id="frame" src="about:blank"></iframe>
     24  <iframe id="frame2" src="about:crashes"></iframe>
     25 </body>
     26 </html>