tor-browser

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

setCustomValidity-normalize-newlines.html (524B)


      1 <!DOCTYPE html>
      2 <html>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <form>
      6  <input id="email" required>
      7 </form>
      8 <script>
      9 test(function() {
     10  const input = document.getElementById("email");
     11  input.setCustomValidity("First line\rSecond line\r\nThird line\nFourth line");
     12  assert_equals(input.validationMessage, "First line\nSecond line\nThird line\nFourth line");
     13 }, "setCustomValidity should normalize newlines from the given error message");
     14 </script>
     15 </html>