[css-grid] Scroll reset position when updating inner html on content
[WebKit-https.git] / LayoutTests / editing / deleting / whitespace-pre-1.html
1 <script src="../../resources/dump-as-markup.js"></script>
2 <p id="description">This tests for a bug in endOfLine.</p>
3
4 <div id="test" contenteditable="true" style="white-space:pre;">You should not see this paragraph unless the command has been undone.
5 There should be three paragraphs in this editable region.
6 The first one should be empty.</div>
7
8 <script>
9 function runTestsOn(platform) {
10     var e = document.getElementById("test");
11     var s = window.getSelection();
12
13     if (window.internals)
14         internals.settings.setEditingBehavior(platform);
15
16     s.setPosition(e, 0);
17     s.modify("extend", "forward", "lineBoundary");
18     document.execCommand("Delete");
19     Markup.dump("test", "on " + platform);
20     document.execCommand("undo");
21     Markup.dump("test", "after undo on " + platform);
22 }
23
24 if (window.testRunner)
25     testRunner.dumpEditingCallbacks();
26 Markup.description(description.textContent);
27 Markup.dump("test", "initial state");
28 runTestsOn("mac");
29 runTestsOn("win");
30 runTestsOn("unix");
31 </script>