tor-browser

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

test_urlutils_stringify.html (1231B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=959190
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 959190</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=959190">Mozilla Bug 959190</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16  <iframe name="x" id="x"></iframe>
     17  <iframe name="y" id="y"></iframe>
     18 </div>
     19 <pre id="test">
     20 </pre>
     21  <a id="link" href="http://www.example.com:8080">foobar</a>
     22  <area id="area" href="http://www.example.com:8080" />
     23  <script type="application/javascript">
     24 
     25  var url = new URL("http://www.example.com:8080");
     26  is(url + "", "http://www.example.com:8080/", "URL stringify");
     27 
     28  var link = document.getElementById("link");
     29  is(link + "", "http://www.example.com:8080/", "Anchor stringify");
     30 
     31  var area = document.getElementById("area");
     32  is(area + "", "http://www.example.com:8080/", "Area stringify");
     33 
     34  is((location + "").indexOf(`${location.origin}/tests/dom/url/tests/test_urlutils_stringify.html`), 0, "Location stringify");
     35  </script>
     36 </body>
     37 </html>