OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script src="resources/util.js"></script> | 5 <script src="resources/util.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <div id="container"> | 8 <div id="container"> |
9 <div id="destination" contentEditable></div> | 9 <div id="destination" contentEditable></div> |
10 </div> | 10 </div> |
(...skipping 13 matching lines...) Expand all Loading... |
24 window.getSelection().removeAllRanges(); | 24 window.getSelection().removeAllRanges(); |
25 var range = document.createRange(); | 25 var range = document.createRange(); |
26 range.setStart(textNode, 2); | 26 range.setStart(textNode, 2); |
27 range.setEnd(textNode, 2); | 27 range.setEnd(textNode, 2); |
28 window.getSelection().addRange(range); | 28 window.getSelection().addRange(range); |
29 | 29 |
30 // Context menu key to show the context menu. | 30 // Context menu key to show the context menu. |
31 eventSender.keyDown("menu"); | 31 eventSender.keyDown("menu"); |
32 | 32 |
33 // Esc to close the context menu. | 33 // Esc to close the context menu. |
34 eventSender.keyDown(String.fromCharCode(0x001B)); | 34 eventSender.keyDown("escape"); |
35 | 35 |
36 shouldBeEqualToString("window.getSelection().toString()", "wellcome"); | 36 shouldBeEqualToString("window.getSelection().toString()", "wellcome"); |
37 } | 37 } |
38 }); | 38 }); |
39 | 39 |
40 </script> | 40 </script> |
41 </body> | 41 </body> |
42 </html> | 42 </html> |
OLD | NEW |