Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2004 15:09:33 +0000 (15:09 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2004 15:09:33 +0000 (15:09 +0000)
        Added a couple more layout tests.

        * layout-tests/editing/deleting/delete-line-013-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-013.html: Added.
        * layout-tests/editing/deleting/delete-line-014-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-014.html: Added.

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

LayoutTests/editing/deleting/delete-line-013-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-013.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-014-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-line-014.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/deleting/delete-line-013-expected.txt b/LayoutTests/editing/deleting/delete-line-013-expected.txt
new file mode 100644 (file)
index 0000000..746f309
--- /dev/null
@@ -0,0 +1,18 @@
+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
+        RenderText {TEXT} at (0,0) size 139x28
+          text run at (0,0) width 139: "There is a tide"
+      RenderBlock (anonymous) at (0,28) size 784x28
+        RenderText {TEXT} at (0,0) size 197x28
+          text run at (0,0) width 197: "in the affairs of men"
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 15 of child 1 {TEXT} of child 1 {DIV} of root {BODY}
+upstream:   position 15 of child 1 {TEXT} of child 1 {DIV} of root {BODY}
+downstream: position 15 of child 1 {TEXT} of child 1 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/deleting/delete-line-013.html b/LayoutTests/editing/deleting/delete-line-013.html
new file mode 100644 (file)
index 0000000..3a16fd9
--- /dev/null
@@ -0,0 +1,33 @@
+<html> 
+<head>
+
+<style>
+body { 
+    font-size: 24px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 16; i++)
+        moveSelectionForwardByCharacterCommand(); 
+    deleteCommand(); 
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+<div id="test">There is a tide</div><br>in the affairs of men
+
+<!-- Delete only the <br> after the block -->
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-line-014-expected.txt b/LayoutTests/editing/deleting/delete-line-014-expected.txt
new file mode 100644 (file)
index 0000000..860dd53
--- /dev/null
@@ -0,0 +1,17 @@
+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
+        RenderText {TEXT} at (0,0) size 15x28
+          text run at (0,0) width 15: "T"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (0,28) size 197x28
+          text run at (0,28) width 197: "in the affairs of men"
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock (anonymous) at (0,56) size 784x0
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 1 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 1 {DIV} of root {BODY}
+downstream: position 0 of child 2 {BR} of child 1 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/deleting/delete-line-014.html b/LayoutTests/editing/deleting/delete-line-014.html
new file mode 100644 (file)
index 0000000..98236c3
--- /dev/null
@@ -0,0 +1,38 @@
+<html> 
+<head>
+
+<style>
+body { 
+    font-size: 24px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    moveSelectionForwardByCharacterCommand(); 
+    for (i = 0; i < 15; i++)
+        extendSelectionForwardByCharacterCommand(); 
+    deleteCommand(); 
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+<div id="test">There is a tide</div><br>in the affairs of men
+
+<!-- Do not fall into the trap represented by this bug:
+     <rdar://problem/3890955> 8A314: Forward delete sometimes fails to delete the selected quoted text
+     
+     Delete the whole selection and not just the trailing <br>.
+-->
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index e1c38ca1362f04c89cc9a1f68b6293e4000a4304..c15b24e9f1619ae946d240cb8159e5cb504dc395 100644 (file)
@@ -1,3 +1,14 @@
+2004-12-07  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+        
+        Added a couple more layout tests.
+
+        * layout-tests/editing/deleting/delete-line-013-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-line-013.html: Added.
+        * layout-tests/editing/deleting/delete-line-014-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-line-014.html: Added.
+
 2004-12-06  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Hyatt.