--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "test"
+ RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 12x28
+ text run at (14,14) width 12: "x"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ selectAllCommand();
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "test"
+ RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 12x28
+ text run at (14,14) width 12: "x"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "test"
+ RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 46x28
+ text run at (14,14) width 46: "xtest"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">testtest</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "test"
+ RenderBlock {DIV} at (0,56) size 784x28 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,84) size 784x28 [border: (2px solid #FF0000)]
+selection is CARET:
+start: position 0 of child 3 {DIV} of root {BODY}
+upstream: position 0 of child 3 {DIV} of root {BODY}
+downstream: position 1 of child 3 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "test"
+ RenderBlock {DIV} at (0,56) size 784x28 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,84) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 12x28
+ text run at (14,14) width 12: "x"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x28 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,28) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 46x28
+ text run at (14,14) width 46: "xtest"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 32x28
+ text run at (14,14) width 32: "foo"
+ RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 37x28
+ text run at (14,14) width 37: " bar"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 3; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">foo bar</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x28 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,28) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 44x28
+ text run at (14,14) width 44: "xfoo"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" >
+<div class="editing" id="test">foo</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x18
+ RenderText {TEXT} at (0,0) size 21x18
+ text run at (0,0) width 21: "test"
+ RenderBlock {DIV} at (0,18) size 784x18
+ RenderText {TEXT} at (0,0) size 8x18
+ text run at (0,0) width 8: "x"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ selectAllCommand();
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root">
+<div id="test">test</div>
+
+<!-- This test is very similar to other insert-div tests, except that it does not place a height (using CSS) on
+ blocks that are added. Bugs involving "block placeholders" (br elements added to give a block height)
+ will be exposed in this test but not others. -->
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2004-12-06 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by me
+
+ New layout tests.
+
+ * layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-001.html: Added.
+ * layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-002.html: Added.
+ * layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-003.html: Added.
+ * layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-004.html: Added.
+ * layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-005.html: Added.
+ * layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-006.html: Added.
+ * layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-007.html: Added.
+ * layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-008.html: Added.
+ * layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-009.html: Added.
+
2004-12-06 Ken Kocienda <kocienda@apple.com>
Reviewed by Harrison