Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / key-events-in-editable-flexbox.html
blob78e8a1a7159c512bd110f3642c2a0fed8390475b
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 #target {
6 display: flex;
7 display: -webkit-flex;
9 </style>
10 <script>
11 var targetDiv;
13 function test()
15 targetDiv = document.getElementById('target');
16 targetDiv.focus();
18 if (window.testRunner) {
19 // Move cursor to the end of line.
20 eventSender.keyDown("end", []);
22 eventSender.keyDown('E');
23 eventSender.keyDown('S');
24 eventSender.keyDown('T');
25 shouldBeEqualToString("targetDiv.innerText", "TEST");
27 eventSender.keyDown("backspace", []);
28 eventSender.keyDown("backspace", []);
29 eventSender.keyDown("backspace", []);
30 eventSender.keyDown("backspace", []);
31 shouldBeEmptyString("targetDiv.innerText");
33 eventSender.keyDown('T');
34 eventSender.keyDown('E');
35 eventSender.keyDown('S');
36 eventSender.keyDown('T');
37 shouldBeEqualToString("targetDiv.innerText", "TEST");
40 </script>
41 </head>
43 <body onload="test()">
44 <div id="target" contentEditable>T</div>
45 </body>
46 </html>