fast/dom/shadow/shadow-dom-event-dispatching.html flake
[WebKit-https.git] / LayoutTests / fast / dom / shadow / shadow-dom-event-dispatching-text-node-in-shadow-root.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': 'shadow-host'},
18                                 createShadowRoot())));
19         var shadowRoot = getNodeInShadowTreeStack('shadow-host/');
20         shadowRoot.id = 'shadow-root';
21         shadowRoot.innerHTML = 'Text Nodes';
22         addEventListeners(['top', 'shadow-host', 'shadow-host/']);
23         showSandboxTree();
24
25         // Calculates the position of the text node in the shadow root.
26         var host = document.getElementById('shadow-host');
27         var x = host.offsetLeft + 5;
28         var y = host.offsetTop + defaultPaddingSize + 5;
29         debug('\n' + 'Moving mouse from a direct child text node of the shadow root to top');
30         eventSender.mouseMoveTo(x, y);
31         clearEventRecords();
32         moveMouseOver(document.getElementById('top'));
33         debugDispatchedEvent('mouseout');
34         debugDispatchedEvent('mouseover');
35     </script>
36     <script src="../../js/resources/js-test-post.js"></script>
37 </body>
38 </html>
39