2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
4 <script type=
"text/javascript">
7 async_test(function(t
) {
8 if (!window
.eventSender
)
9 assert_unreached("This test requires window.eventSender to exist");
11 document
.addEventListener("DOMContentLoaded", t
.step_func(function() {
12 var iframe1
= document
.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
13 iframe1
.setAttribute("srcdoc", "ABC");
14 document
.documentElement
.appendChild(iframe1
);
15 var document1
= document
.implementation
.createDocument("", null);
16 iframe1
.addEventListener("DOMFocusOut", function() {
17 document1
.adoptNode(iframe1
);
21 iframe1
.addEventListener("load", t
.step_func(function() {
22 document
.designMode
= "on";
24 var clientRect
= iframe1
.getBoundingClientRect();
25 var x
= clientRect
.left
+ 10;
26 var y
= clientRect
.top
+ 10;
27 eventSender
.gestureLongPress(x
, y
);
29 // Test passes if it does not crash and reaches this point
30 setTimeout(t
.done
.bind(t
), 0);
33 }, "Test longpress selection does not crash");