Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / attribute-listener-cloned-from-frameless-doc.xhtml
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <body>
3 <p>Test that an element that was imported from a frameless document has functional attribute event listeners. Should alert "SUCCESS".</p>
4 <script>
5 <![CDATA[
6     if (window.testRunner)
7         testRunner.dumpAsText();
8
9     var doc = (new DOMParser).parseFromString('<html xmlns="http://www.w3.org/1999/xhtml"><a id="a" href="javascript:alert(\'FAIL\')" onclick="alert(\'SUCCESS\'); return false">Link (clicked automatically).</a></html>', "application/xhtml+xml");
10
11     var a = doc.documentElement.firstChild.cloneNode(true);
12     document.getElementsByTagName("body")[0].appendChild(a);
13
14     var event = document.createEvent('MouseEvent');
15     event.initEvent('click', true, true);
16     document.getElementsByTagName('a')[0].dispatchEvent(event);
17
18     if (0 == document.getElementsByTagName('a')[0].onclick.toString().indexOf("function onclick"))
19         document.body.appendChild(document.createTextNode("Element.onclick result is correct."));
20 ]]>
21 </script>
22 </body>
23 </html>