4 <script src=
"../../../resources/js-test.js"></script>
11 <button>Click me
</button>
14 function clickOn(element
)
16 if (!window
.eventSender
)
18 var rect
= element
.getBoundingClientRect();
19 eventSender
.mouseMoveTo(rect
.left
+ rect
.width
/ 2, rect
.top
+ rect
.height
/ 2);
20 eventSender
.mouseDown();
21 eventSender
.mouseUp();
25 description('Tests that nodes transposed into the dialog are not inert. The test passes if you can click the button.');
27 dialog
= document
.querySelector('dialog');
28 root
= document
.querySelector('#host').createShadowRoot();
29 root
.appendChild(dialog
);
32 button
= document
.querySelector('button');
33 dialog
.addEventListener('click', function(event
) {
34 if (event
.target
== button
)
35 testPassed('button was clicked');
37 testFailed('button was not clicked');