Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / editing / pasteboard / emacs-ctrl-k-with-move.html
1 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=73888">bug 73888</a>:
2 Kill ring is not cleared when selection changes.</p>
3
4 <div contenteditable id=ce>
5 one
6 <div>two</div>
7 <div>three</div>
8 <div>four</div>
9 <div>five</div>
10 <div><br></div>
11 </div>
12
13 <div>
14 Expected result:
15 <div>one</div>
16 <div>three</div>
17 <div>five</div>
18 <div>four</div>
19 <div><br></div>
20 </div>
21
22 <script>
23 if (window.testRunner) {
24     testRunner.dumpAsText();
25     document.getElementById("ce").focus();
26     testRunner.execCommand("moveDown");
27     testRunner.execCommand("deleteToEndOfParagraph");
28     testRunner.execCommand("deleteToEndOfParagraph");
29     testRunner.execCommand("moveDown");
30     testRunner.execCommand("deleteToEndOfParagraph");
31     testRunner.execCommand("deleteToEndOfParagraph");
32     testRunner.execCommand("moveDown");
33     testRunner.execCommand("yank");
34 } else
35     document.write("This test only runs in automatic mode");
36 </script>