tor-browser

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

test_bug1209658.html (1232B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1209658
      5 -->
      6 <head>
      7  <title>Test for Bug 1209658</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1209658">Mozilla Bug 1209658</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15  
     16 </div>
     17 <script type="application/javascript">
     18 SimpleTest.waitForExplicitFinish();
     19 
     20 addLoadEvent(function loaded() {
     21  for (var iframe of document.querySelectorAll("iframe")) {
     22    is(SpecialPowers.wrap(iframe).contentWindow.location.href, iframe.src, "should load correct URL");
     23    is(SpecialPowers.wrap(iframe).contentDocument.body.textContent, '{"<p>Hello</p>": null}',
     24       iframe.getAttribute("mimeType") + " should be treated as text");
     25  }
     26  SimpleTest.finish();
     27 });
     28 </script>
     29 <iframe src="data:text/json,{&quot;<p>Hello</p>&quot;:%20null}"
     30        mimeType="text/json"></iframe>
     31 <!-- Totally not valid VTT data, but doesn't matter for our purposes here -->
     32 <iframe src="data:text/vtt,{&quot;<p>Hello</p>&quot;:%20null}"
     33        mimeType="text/vtt"></iframe>
     34 </body>
     35 </html>