4 <title>Touch Adjustment : Handle long press on a shadow DOM element - bug
96313</title>
5 <script src=
"../resources/js-test.js"></script>
6 <script src=
"resources/touchadjustment.js"></script>
24 <div id=
"sandbox"></div>
25 <p id='description'
></p>
26 <div id='console'
></div>
29 var sandbox
= document
.getElementById('sandbox');
31 function addShadowDOM() {
32 var targetDiv
= document
.getElementById("sandbox");
33 var root
= targetDiv
.createShadowRoot();
34 var shadowDiv
= document
.createElement("div");
35 shadowDiv
.style
.width
= "20px";
36 shadowDiv
.style
.height
= "20px";
37 shadowDiv
.style
.background
= "#ff0";
38 shadowDiv
.style
.position
= "absolute";
39 shadowDiv
.style
.right
= "10px";
40 shadowDiv
.style
.top
= "10px";
41 root
.appendChild(shadowDiv
);
46 if (window
.testRunner
&& window
.internals
&& internals
.touchNodeAdjustedToBestContextMenuNode
) {
47 description('Test touch adjustment for context-menu gestures on a shadow-DOM element.');
49 // Test that a long press centered on a shadow-DOM element does not crash.
50 testTouchPointContextMenu(touchPoint(80, 20, 10), null);