tor-browser

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

foreign_content_004.html (2293B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title>HTML 5 Foreign Content SVG in HTML </title>
      5        <meta description="Test to verify SVG inside HTML CAPTION element parses correctly" />
      6        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
      7 
      8        <script type="text/javascript">
      9            function RunTest()
     10            {
     11                try
     12                {
     13                    var svgNS = "http://www.w3.org/2000/svg";
     14                    if(document.getElementsByTagName("caption")[0].childNodes[1].localName=="svg" && document.getElementsByTagName("rect")[0].namespaceURI==svgNS)
     15                    {
     16                        document.getElementsByTagName("rect")[0].setAttribute("fill","green");
     17                    }
     18                    else
     19                    {
     20                        document.getElementsByTagName("rect")[0].setAttribute("fill","red");
     21                    }
     22                }
     23                catch(ex)
     24                {
     25                    document.getElementsByTagName("rect")[0].setAttribute("fill","red")
     26                }
     27            }
     28        </script>
     29    </head>
     30 
     31    <body onLoad="RunTest()">
     32        <div class="testdata">
     33            <p id="instructions">Test passes if a green square appears above and centered relative to the table.</p>
     34        </div>
     35        <div>
     36            <table border="1">
     37                <caption>
     38                    <svg width="100px" height="100px">
     39                        <rect width="100px" height="100px" fill="none" />
     40                    </svg>
     41                </caption>
     42                <thead>
     43                    <th>FillerText</th>
     44                    <th>FillerText</th>
     45                    <th>FillerText</th>
     46                </thead>
     47                <tr>
     48                    <td>FillerText</td>
     49                    <td>FillerText</td>
     50                    <td>FillerText</td>
     51                </tr>
     52                <tr>
     53                    <td>FillerText</td>
     54                    <td>FillerText</td>
     55                    <td>FillerText</td>
     56                </tr>
     57                <tr>
     58                    <td>FillerText</td>
     59                    <td>FillerText</td>
     60                    <td>FillerText</td>
     61                </tr>
     62            </table>
     63        </div>
     64    </body>
     65 </html>