fast/dom/shadow/shadow-dom-event-dispatching.html flake
[WebKit-https.git] / LayoutTests / fast / dom / shadow / shadow-dom-event-dispatching-manually-fired-with-same-related-target.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <script src="../../js/resources/js-test-pre.js"></script>
5     <script src="resources/shadow-dom.js"></script>
6     <script src="resources/event-dispatching.js"></script>
7 </head>
8 <body>
9     <p id="description"></p>
10     <div id="sandbox"></div>
11     <pre id="console"></pre>
12     <script>
13         var sandbox = document.getElementById('sandbox');
14
15         sandbox.appendChild(
16             createDOM('div', {'id': 'top'},
17                       createDOM('div', {'id': 'host'},
18                                 createShadowRoot(
19                                     createDOM('div', {'id': 'div1'})))));
20
21         addEventListeners(['top', 'host', 'host/', 'host/div1']);
22         getNodeInShadowTreeStack('host/').id = 'shadow-root';
23         showSandboxTree();
24
25         var div1 = getNodeInShadowTreeStack('host/div1');
26
27         clearEventRecords();
28         var event = document.createEvent("MouseEvents");
29         event.initMouseEvent("mouseover", true, false, window,
30                              0, 10, 10, 10, 10, false, false, false, false, 0, div1);
31         div1.dispatchEvent(event);
32
33         debugDispatchedEvent('mouseout');
34         debugDispatchedEvent('mouseover');
35     </script>
36     <script src="../../js/resources/js-test-post.js"></script>
37 </body>
38 </html>
39