OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script type="text/javascript"> |
| 5 "use strict"; |
| 6 |
| 7 async_test(function(t) { |
| 8 if (!window.eventSender) |
| 9 assert_unreached("This test requires window.eventSender to exist"); |
| 10 |
| 11 document.addEventListener("DOMContentLoaded", t.step_func(function() { |
| 12 var iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "if
rame"); |
| 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); |
| 18 }); |
| 19 iframe1.focus(); |
| 20 |
| 21 iframe1.addEventListener("load", t.step_func(function() { |
| 22 document.designMode = "on"; |
| 23 |
| 24 var clientRect = iframe1.getBoundingClientRect(); |
| 25 var x = clientRect.left + 10; |
| 26 var y = clientRect.top + 10; |
| 27 eventSender.gestureLongPress(x, y); |
| 28 |
| 29 // Test passes if it does not crash and reaches this point |
| 30 setTimeout(t.done.bind(t), 0); |
| 31 })); |
| 32 })); |
| 33 }, "Test longpress selection does not crash"); |
| 34 </script> |
OLD | NEW |