tor-browser

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

unclosed-svg-script.html (1339B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title></title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <script>
      7    var scriptWithEndTagRan = false;
      8    var scriptWithoutEndTagRan = false;
      9    var scriptWithBogusEndTagInsideRan = false;
     10    var scriptWithBreakout = false;
     11    var scriptSelfClosing = false;
     12 </script>
     13 <svg>
     14    <script>scriptWithEndTagRan = true;</script>
     15 </svg>
     16 <svg>
     17    <script>scriptWithoutEndTagRan = true;
     18 </svg>
     19 <svg>
     20    <script>scriptWithBogusEndTagInsideRan = true;</g></script>
     21 </svg>
     22 <svg>
     23    <script>scriptWithBreakout = true;<s></script>
     24 </svg>
     25 <svg>
     26    <script href="support/svg-script-self-closing.js"/>
     27 </svg>
     28 </s>
     29 <script>
     30    test(function() {
     31        assert_true(scriptWithEndTagRan);
     32    }, "SVG scripts with end tag should run");
     33    test(function() {
     34        assert_false(scriptWithoutEndTagRan);
     35    }, "SVG scripts without end tag should not run");
     36    test(function() {
     37        assert_true(scriptWithBogusEndTagInsideRan);
     38    }, "SVG scripts with bogus end tag inside should run");
     39    test(function() {
     40        assert_false(scriptWithBreakout);
     41    }, "SVG scripts ended by HTML breakout should not run");
     42    test(function() {
     43        assert_true(scriptSelfClosing);
     44    }, "SVG scripts with self-closing start tag should run");
     45 </script>