Copying and pasting trivial H2 content causes a crash in firstPositionInNode
[WebKit-https.git] / LayoutTests / editing / pasteboard / heading-crash.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <script src="../editing.js"></script>
7 <script src="../../resources/dump-as-markup.js"></script>
8 <h2 id="source" contenteditable="true">Copy This Text</h2>
9 <h2 id="destination" contenteditable="true">Paste Here</h2>
10 <script>
11     if (window.testRunner)
12         testRunner.dumpAsText();
13
14     var source = document.getElementById("source");
15     var destination = document.getElementById("destination");
16
17     source.focus();
18     selectAllCommand();
19     copyCommand();
20     destination.focus();
21     selectAllCommand();
22     pasteCommand();
23
24     Markup.description("The following test does a copy and a paste from one heading to another heading. The test is successful if there is no crash.");
25     Markup.dump(destination, 'Destination should say Copy This Text');
26 </script>
27 </html>