tor-browser

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

050.html (755B)


      1 <!doctype html>
      2 <title>document.write plaintext</title>
      3 <script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
      4 <div id="log"></div><script>
      5 var t = async_test();
      6 
      7 t.step(function() {
      8  document.write("<plaintext>");
      9  assert_equals(document.body.childNodes[2].nodeType, document.ELEMENT_NODE);
     10  assert_equals(document.body.childNodes[2].localName, "plaintext");
     11  var s = "Filler ";
     12  for (var i=0; i<s.length; i++) {
     13    document.write(s[i]);
     14    assert_equals(document.body.childNodes[2].textContent, s.slice(0,i+1));
     15  }
     16  document.close();
     17 });
     18 
     19 onload = function() {
     20  t.step(function() {
     21    assert_equals(document.body.childNodes[2].textContent, "Filler Text\n");
     22  });
     23  t.done();
     24 }
     25 </script>Text