Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Dec 2004 18:57:58 +0000 (18:57 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Dec 2004 18:57:58 +0000 (18:57 +0000)
        Added new layout tests covering cases from recent bug fixes.

        * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-018.html: Added.
        * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-019.html: Added.
        * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-020.html: Added.
        * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-021.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/editing/inserting/insert-div-018-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-018.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-019-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-019.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-020-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-020.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-021-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-021.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/inserting/insert-div-018-expected.txt b/LayoutTests/editing/inserting/insert-div-018-expected.txt
new file mode 100644 (file)
index 0000000..63dae57
--- /dev/null
@@ -0,0 +1,20 @@
+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 (anonymous) at (0,0) size 784x28
+        RenderText {TEXT} at (0,0) size 667x28
+          text run at (0,0) width 667: "Test inserting paragraphs: should see an empty blue box below \"bar\""
+      RenderBlock {DIV} at (0,28) size 784x12
+      RenderBlock (anonymous) at (0,40) size 784x28
+        RenderText {TEXT} at (0,0) size 31x28
+          text run at (0,0) width 31: "bar"
+      RenderBlock {P} at (0,68) size 784x28 [border: (2px solid #0000FF)]
+      RenderBlock {DIV} at (0,96) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "baz"
+selection is CARET:
+start:      position 0 of child 4 {P} of root {BODY}
+upstream:   position 0 of child 4 {P} of root {BODY}
+downstream: position 1 of child 4 {P} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-018.html b/LayoutTests/editing/inserting/insert-div-018.html
new file mode 100644 (file)
index 0000000..d9c27d7
--- /dev/null
@@ -0,0 +1,44 @@
+<html> 
+<head>
+
+<style>
+body {
+    font-size: 24px; 
+}
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+}
+p {
+    border: 2px solid blue; 
+    padding: 12px; 
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    moveSelectionBackwardByCharacterCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+
+Test inserting paragraphs: should see an empty blue box below "bar"
+
+<div style="height: 12px"></div>
+
+bar<div class="editing" id="test">baz</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-019-expected.txt b/LayoutTests/editing/inserting/insert-div-019-expected.txt
new file mode 100644 (file)
index 0000000..a426256
--- /dev/null
@@ -0,0 +1,23 @@
+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 784x568
+      RenderBlock (anonymous) at (0,0) size 784x56
+        RenderText {TEXT} at (0,0) size 748x56
+          text run at (0,0) width 748: "Test inserting paragraphs: should see an empty blue box above an empty line"
+          text run at (0,28) width 237: "between \"foo\" and \"bar\""
+      RenderBlock {DIV} at (0,56) size 784x12
+      RenderBlock {P} at (0,92) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 32x28
+          text run at (14,14) width 32: "foo"
+      RenderBlock {P} at (0,172) size 784x28 [border: (2px solid #0000FF)]
+      RenderBlock (anonymous) at (0,200) size 784x28
+        RenderBR {BR} at (0,0) size 0x28
+      RenderBlock {P} at (0,252) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 31x28
+          text run at (14,14) width 31: "bar"
+selection is CARET:
+start:      position 0 of child 6 {BR} of root {BODY}
+upstream:   position 0 of child 6 {BR} of root {BODY}
+downstream: position 0 of child 6 {BR} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-019.html b/LayoutTests/editing/inserting/insert-div-019.html
new file mode 100644 (file)
index 0000000..6520878
--- /dev/null
@@ -0,0 +1,45 @@
+<html> 
+<head>
+
+<style>
+body {
+    font-size: 24px; 
+}
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+}
+p {
+    border: 2px solid blue; 
+    padding: 12px; 
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+
+Test inserting paragraphs: should see an empty blue box above an empty line between "foo" and "bar"
+
+<div style="height: 12px"></div>
+
+<p id="test" class="editing">foo</p><br><p class="editing">bar</p>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-020-expected.txt b/LayoutTests/editing/inserting/insert-div-020-expected.txt
new file mode 100644 (file)
index 0000000..f019264
--- /dev/null
@@ -0,0 +1,24 @@
+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 (anonymous) at (0,0) size 784x56
+        RenderText {TEXT} at (0,0) size 766x56
+          text run at (0,0) width 766: "Test inserting paragraphs: should see a blue box with \"bar\" in it, and two blank"
+          text run at (0,28) width 295: "lines between \"foo\" and \"bar\"."
+      RenderBlock {DIV} at (0,56) size 784x12
+      RenderBlock (anonymous) at (0,68) size 784x84
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (0,0) size 32x28
+            text run at (0,0) width 32: "foo"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderBR {BR} at (0,28) size 0x28
+        RenderBR {BR} at (0,56) size 0x28
+      RenderBlock {P} at (0,152) size 784x56 [border: (2px solid #0000FF)]
+        RenderText {TEXT} at (14,14) size 31x28
+          text run at (14,14) width 31: "bar"
+selection is CARET:
+start:      position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
+upstream:   position 0 of child 8 {P} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-020.html b/LayoutTests/editing/inserting/insert-div-020.html
new file mode 100644 (file)
index 0000000..029aeba
--- /dev/null
@@ -0,0 +1,48 @@
+<html> 
+<head>
+
+<style>
+body {
+    font-size: 24px; 
+}
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+}
+p {
+    border: 2px solid blue; 
+    padding: 12px; 
+}
+br {
+    background-color: green; 
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 5; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs: should see a blue box with "bar" in it, and two blank lines between "foo" and "bar".
+
+<div style="height: 12px"></div>
+
+<span id="test">foo</span><br><br>bar
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-021-expected.txt b/LayoutTests/editing/inserting/insert-div-021-expected.txt
new file mode 100644 (file)
index 0000000..54dbb18
--- /dev/null
@@ -0,0 +1,34 @@
+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 (anonymous) at (0,0) size 784x112
+        RenderText {TEXT} at (0,0) size 776x56
+          text run at (0,0) width 776: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a blue"
+          text run at (0,28) width 410: "box with with \"bar\" in it. Fix for this bug: "
+        RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
+          RenderText {TEXT} at (410,28) size 260x28
+            text run at (410,28) width 260: "<rdar://problem/3924579>"
+        RenderText {TEXT} at (0,56) size 763x56
+          text run at (0,56) width 763: "REGRESSION (Mail): After deleting, hitting return key does not insert visible"
+          text run at (0,84) width 77: "newline"
+      RenderBlock {DIV} at (0,112) size 784x12
+      RenderBlock (anonymous) at (0,124) size 784x28
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (0,0) size 32x28
+            text run at (0,0) width 32: "foo"
+      RenderBlock (anonymous) at (0,152) size 784x84
+        RenderBlock {P} at (0,0) size 784x28 [border: (2px solid #0000FF)]
+        RenderBlock {P} at (0,28) size 784x56 [border: (2px solid #0000FF)]
+          RenderInline {SPAN} at (0,0) size 31x28
+            RenderText {TEXT} at (14,14) size 31x28
+              text run at (14,14) width 31: "bar"
+      RenderBlock (anonymous) at (0,236) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 0 of child 1 {TEXT} of child 1 {SPAN} of child 3 {P} of child 6 {SPAN} of root {BODY}
+upstream:   position 0 of child 3 {P} of child 6 {SPAN} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 1 {SPAN} of child 3 {P} of child 6 {SPAN} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-021.html b/LayoutTests/editing/inserting/insert-div-021.html
new file mode 100644 (file)
index 0000000..23d1b7a
--- /dev/null
@@ -0,0 +1,52 @@
+<html> 
+<head>
+
+<style>
+body {
+    font-size: 24px; 
+}
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+}
+p {
+    border: 2px solid blue; 
+    padding: 12px; 
+}
+br {
+    background-color: green; 
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    deleteCommand();
+    insertParagraphCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs: should see "foo", then an empty blue box, then a blue box with with "bar" in it. Fix for this bug:
+<a href="rdar://problem/3924579">&lt;rdar://problem/3924579&gt;</a> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
+
+
+<div style="height: 12px"></div>
+
+<span id="test">foo</span><br>bar
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index 4a32b1b7aa207b41140e27aa2f0bf028fc2fa063..7e62a996768842185ed396450a45e6609afd8ccd 100644 (file)
@@ -1,3 +1,18 @@
+2004-12-17  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+        
+        Added new layout tests covering cases from recent bug fixes.
+
+        * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-018.html: Added.
+        * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-019.html: Added.
+        * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-020.html: Added.
+        * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-021.html: Added.
+
 2004-12-17  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by me