Add support for @href attribute in MathML
[WebKit-https.git] / LayoutTests / imported / mathml-in-html5 / mathml / relations / html5-tree / href-click-1.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="Verify that a click on a link moves to the target.">
9 <script type="text/javascript">
10   function test()
11   {
12     var event = new MouseEvent('click', {bubbles: true, cancelable: true});
13     document.getElementById('link').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 id="link" href="#target">
24         <mspace id="space" width="150px" height="150px" mathbackground="red"/>
25       </mrow>
26     </math>
27     <div style="height: 500px;"></div>
28     <math id="target" style="padding: 0">
29       <mspace width="150px" height="150px" mathbackground="green"/>
30     </math>
31   </div>
32
33 </body>
34 </html>