Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
|
yosin_UTC9
2015/09/01 01:33:29
nit: We don't need to have an extra blank line.
majidvp
2015/09/01 15:33:53
Done.
| |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <script type="text/javascript"> | |
| 6 "use strict"; | |
|
yosin_UTC9
2015/09/01 01:33:29
nit: We don't need to have "use strict", because t
majidvp
2015/09/01 15:33:53
That is correct. Given it is irrelevant I prefer t
| |
| 7 | |
| 8 async_test(function(t) { | |
| 9 document.addEventListener("DOMContentLoaded", t.step_func(function() { | |
| 10 var iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "if rame"); | |
| 11 iframe1.setAttribute("srcdoc", "ABC"); | |
| 12 document.documentElement.appendChild(iframe1); | |
| 13 var document1 = document.implementation.createDocument("", null); | |
| 14 iframe1.addEventListener("DOMFocusOut", function() { | |
| 15 document1.adoptNode(iframe1); | |
| 16 }); | |
| 17 iframe1.focus(); | |
| 18 | |
| 19 iframe1.addEventListener("load", t.step_func(function() { | |
| 20 document.designMode = "on"; | |
| 21 | |
| 22 var clientRect = iframe1.getBoundingClientRect(); | |
| 23 var x = clientRect.left + 10; | |
| 24 var y = clientRect.top + 10; | |
| 25 if (window.eventSender) | |
|
yosin_UTC9
2015/09/01 01:33:29
nit: It is better to check |window.eventSender| at
majidvp
2015/09/01 15:33:53
Done.
| |
| 26 eventSender.gestureLongPress(x, y); | |
| 27 else | |
| 28 assert_unreached("This test requires window.eventSender to exist"); | |
| 29 | |
| 30 // Test passes if it does not crash and reaches this point | |
| 31 setTimeout(t.done.bind(t), 0); | |
| 32 })); | |
| 33 })); | |
| 34 }, "Test longpress selection does not crash"); | |
| 35 </script> | |
| OLD | NEW |