Add support for @href attribute in MathML
[WebKit-https.git] / LayoutTests / imported / mathml-in-html5 / mathml / relations / html5-tree / href-click-2.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8"/>
5 <title>href click</title>
6 <link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#SS2">
7 <link rel="match" href="href-click-ref.html"/>
8 <meta name="assert" content="Test that a click on an element bubbles to an ancestor link.">
9 <script type="text/javascript">
10   function test()
11   {
12     var event = new MouseEvent('click', {bubbles: true, cancelable: true});
13     document.getElementById('space').dispatchEvent(event);
14   }
15 </script>
16 </head>
17 <body onload="test()">
18
19   <p>This test passes if you see a green square.</p>
20
21   <div style="width: 150px; height: 150px; overflow: hidden">
22     <math style="padding: 0">
23       <mrow href="#target">
24         <mrow>
25           <mrow>
26             <mspace id="space" width="150px" height="150px" mathbackground="red"/>
27           </mrow>
28         </mrow>
29       </mrow>
30     </math>
31     <div style="height: 500px;"></div>
32     <math id="target" style="padding: 0">
33       <mspace width="150px" height="150px" mathbackground="green"/>
34     </math>
35   </div>
36
37 </body>
38 </html>