2 <script src=
"../resources/runner.js"></script>
3 <div id=
"container" style=
"-webkit-user-select:none;"></div>
4 <textarea id=
"text"></textarea>
6 const NUMBER_OF_NODES
= 10000;
8 var shadowRoot
= container
.createShadowRoot();
9 for (var i
= 0; i
< NUMBER_OF_NODES
; i
++) {
10 var child
= document
.createElement("div");
11 shadowRoot
.appendChild(child
);
13 var middle
= shadowRoot
.childNodes
[NUMBER_OF_NODES
/ 2];
14 middle
.textContent
= "textToClick";
16 function clickNode(node
) {
17 eventSender
.mouseMoveTo(node
.offsetLeft
+ 5, node
.offsetTop
+5);
18 eventSender
.mouseDown();
19 eventSender
.mouseUp();
23 PerfTestRunner
.measureTime({
24 description
: `Measures performance of clicking a -webkit-user-select:none DOM node which contains ${NUMBER_OF_NODES} children.`,