fast/dom/shadow/shadow-dom-event-dispatching.html flake
[WebKit-https.git] / LayoutTests / fast / dom / shadow / shadow-dom-event-dispatching-non-distributed-nodes.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': 'A'},
18                                 createShadowRoot(
19                                     createDOM('div', {'id': 'B'},
20                                               createDOM('div', {'id': 'C'}))),
21                                 createShadowRoot(
22                                     createDOM('div', {'id': 'D'})),
23                                 createDOM('div', {'id': 'non-distributed-node'}))));
24
25         addEventListeners(['top', 'A', 'A/', 'A/B', 'A/C', 'A//', 'A//D', 'non-distributed-node']);
26         getNodeInShadowTreeStack('A/').id = 'orphaned-shadow-root';
27         getNodeInShadowTreeStack('A//').id = 'youngest-shadow-root';
28         parent.offsetLeft;
29         showSandboxTree();
30
31         clearEventRecords();
32         debug('\nClick C');
33         getNodeInShadowTreeStack('A/C').click();
34         debugDispatchedEvent('click');
35
36         clearEventRecords();
37         debug('\nClick non-distributed-node');
38         document.getElementById('non-distributed-node').click();
39         debugDispatchedEvent('click');
40     </script>
41     <script src="../../js/resources/js-test-post.js"></script>
42 </body>
43 </html>
44