tor-browser

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

test_whitespace.html (693B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Test for ScriptLoader and type with whitespaces</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7 </head>
      8 <body>
      9 
     10 <script type="application/javascript">
     11 let passed = false;
     12 
     13 let tests = [
     14  " application/javascript",
     15  "\tapplication/javascript\n\r \t",
     16 ];
     17 
     18 for (let i = 0; i < tests.length; ++i) {
     19  passed = false;
     20 
     21  let script = document.createElement('script');
     22  script.setAttribute('type', tests[i]);
     23  script.innerText = "passed = true;";
     24  document.body.appendChild(script);
     25 
     26  ok (passed, "Test " + tests[i] + " passed");
     27 }
     28 </script>
     29 
     30 </body>
     31 </html>