tor-browser

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

document.title-04.xhtml (1468B)


      1 <html xmlns="http://www.w3.org/1999/xhtml">
      2 <head>
      3 <title> document.title  and space normalization  </title>
      4 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
      5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title"/>
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 </head>
      9 <body>
     10 <div id="log"></div>
     11 <script>
     12 test(function() {
     13  // Single space characters must be normalized. (WHATWG r4353)
     14  assert_equals(document.title, "document.title and space normalization");
     15 
     16  document.title = "one space";
     17  assert_equals(document.title, "one space");
     18 
     19  document.title = "two  spaces";
     20  assert_equals(document.title, "two spaces");
     21 
     22  document.title = "one\ttab";
     23  assert_equals(document.title, "one tab");
     24 
     25  document.title = "two\t\ttabs";
     26  assert_equals(document.title, "two tabs");
     27 
     28  document.title = "one\nnewline";
     29  assert_equals(document.title, "one newline");
     30 
     31  document.title = "two\n\nnewlines";
     32  assert_equals(document.title, "two newlines");
     33 
     34  document.title = "one\fform feed";
     35  assert_equals(document.title, "one form feed");
     36 
     37  document.title = "two\f\fform feeds";
     38  assert_equals(document.title, "two form feeds");
     39 
     40  document.title = "one\rcarriage return";
     41  assert_equals(document.title, "one carriage return");
     42 
     43  document.title = "two\r\rcarriage returns";
     44  assert_equals(document.title, "two carriage returns");
     45 });
     46 </script>
     47 </body>
     48 </html>