Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Oct 2004 18:49:50 +0000 (18:49 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Oct 2004 18:49:50 +0000 (18:49 +0000)
        Added some more editing layout tests.

        * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-001.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-002.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-003.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-004.html: Added.
        * layout-tests/editing/inserting/typing-003-expected.txt: Added.
        * layout-tests/editing/inserting/typing-003.html: Added.

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

LayoutTests/editing/deleting/delete-ws-fixup-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-001.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-002.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-003.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-ws-fixup-004.html [new file with mode: 0644]
LayoutTests/editing/inserting/typing-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/typing-003.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-001-expected.txt b/LayoutTests/editing/deleting/delete-ws-fixup-001-expected.txt
new file mode 100644 (file)
index 0000000..18e7113
--- /dev/null
@@ -0,0 +1,28 @@
+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 784x84 [border: (2px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 744x56
+          RenderText {TEXT} at (14,14) size 97x28
+            text run at (14,14) width 97: "in Liberty"
+          RenderInline {I} at (0,0) size 117x28
+            RenderText {TEXT} at (111,14) size 117x28
+              text run at (111,14) width 21: "F "
+              text run at (132,14) width 96: "and seven"
+          RenderText {TEXT} at (228,14) size 63x28
+            text run at (228,14) width 63: " years "
+          RenderInline {B} at (0,0) size 15x28
+            RenderText {TEXT} at (291,14) size 15x28
+              text run at (291,14) width 15: "s "
+          RenderText {TEXT} at (306,14) size 744x56
+            text run at (306,14) width 110: "our fathers "
+            text run at (416,14) width 342: "f upon this continent, a new nation,"
+            text run at (14,42) width 232: "conceived    in Liberty, "
+            text run at (246,42) width 386: "and dedicated to the proposition that all"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 7 of child 3 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 7 of child 3 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 4 {B} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-001.html b/LayoutTests/editing/deleting/delete-ws-fixup-001.html
new file mode 100644 (file)
index 0000000..efa3441
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px; 
+    word-wrap: break-word;
+    -khtml-nbsp-mode: space;
+    -khtml-line-break: after-white-space;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 29; i++)
+        moveSelectionForwardByCharacterCommand();    
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">in Liberty<i>F    and seven</i> years <b>  as </b>our fathers  f upon this
+continent, a new nation, conceived &nbsp;&nbsp; in Liberty,                 and dedicated to the
+proposition that all</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-002-expected.txt b/LayoutTests/editing/deleting/delete-ws-fixup-002-expected.txt
new file mode 100644 (file)
index 0000000..538b44a
--- /dev/null
@@ -0,0 +1,28 @@
+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 784x84 [border: (2px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 735x56
+          RenderText {TEXT} at (14,14) size 97x28
+            text run at (14,14) width 97: "in Liberty"
+          RenderInline {I} at (0,0) size 117x28
+            RenderText {TEXT} at (111,14) size 117x28
+              text run at (111,14) width 21: "F "
+              text run at (132,14) width 96: "and seven"
+          RenderText {TEXT} at (228,14) size 63x28
+            text run at (228,14) width 63: " years "
+          RenderInline {B} at (0,0) size 6x28
+            RenderText {TEXT} at (291,14) size 6x28
+              text run at (291,14) width 6: " "
+          RenderText {TEXT} at (297,14) size 735x56
+            text run at (297,14) width 110: "our fathers "
+            text run at (407,14) width 342: "f upon this continent, a new nation,"
+            text run at (14,42) width 232: "conceived    in Liberty, "
+            text run at (246,42) width 386: "and dedicated to the proposition that all"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 7 of child 3 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 7 of child 3 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 4 {B} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-002.html b/LayoutTests/editing/deleting/delete-ws-fixup-002.html
new file mode 100644 (file)
index 0000000..1e647d6
--- /dev/null
@@ -0,0 +1,42 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px; 
+    word-wrap: break-word;
+    -khtml-nbsp-mode: space;
+    -khtml-line-break: after-white-space;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 28; i++)
+        moveSelectionForwardByCharacterCommand();    
+    for (i = 0; i < 2; i++)
+        extendSelectionForwardByCharacterCommand();    
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">in Liberty<i>F    and seven</i> years <b>  as </b>our fathers  f upon this
+continent, a new nation, conceived &nbsp;&nbsp; in Liberty,                 and dedicated to the
+proposition that all</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-003-expected.txt b/LayoutTests/editing/deleting/delete-ws-fixup-003-expected.txt
new file mode 100644 (file)
index 0000000..9643366
--- /dev/null
@@ -0,0 +1,19 @@
+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)]
+        RenderInline {SPAN} at (0,0) size 75x28
+          RenderText {TEXT} at (14,14) size 37x28
+            text run at (14,14) width 37: "bar "
+          RenderInline {SPAN} at (0,0) size 6x28
+            RenderText {TEXT} at (51,14) size 6x28
+              text run at (51,14) width 6: " "
+          RenderText {TEXT} at (57,14) size 32x28
+            text run at (57,14) width 32: "foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 4 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-003.html b/LayoutTests/editing/deleting/delete-ws-fixup-003.html
new file mode 100644 (file)
index 0000000..590c4f2
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px;
+    word-wrap: break-word;
+    -khtml-nbsp-mode: space;
+    -khtml-line-break: after-white-space;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();    
+    for (i = 0; i < 3; i++)
+        extendSelectionForwardByCharacterCommand();    
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">bar baz<span>    </span>foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-004-expected.txt b/LayoutTests/editing/deleting/delete-ws-fixup-004-expected.txt
new file mode 100644 (file)
index 0000000..25d7b3f
--- /dev/null
@@ -0,0 +1,19 @@
+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)]
+        RenderInline {SPAN} at (0,0) size 87x28
+          RenderText {TEXT} at (14,14) size 37x28
+            text run at (14,14) width 37: "bar "
+          RenderInline {SPAN} at (0,0) size 18x28
+            RenderText {TEXT} at (51,14) size 18x28
+              text run at (51,14) width 18: "   "
+          RenderText {TEXT} at (69,14) size 32x28
+            text run at (69,14) width 32: "foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 4 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-ws-fixup-004.html b/LayoutTests/editing/deleting/delete-ws-fixup-004.html
new file mode 100644 (file)
index 0000000..7b51c70
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px;
+    word-wrap: break-word;
+    -khtml-nbsp-mode: space;
+    -khtml-line-break: after-white-space;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();    
+    for (i = 0; i < 3; i++)
+        extendSelectionForwardByCharacterCommand();    
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">bar baz<span>   &nbsp; </span>foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/typing-003-expected.txt b/LayoutTests/editing/inserting/typing-003-expected.txt
new file mode 100644 (file)
index 0000000..b497fd2
--- /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 784x140 [border: (2px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (14,14) size 732x112
+          text run at (14,14) width 696: "xxxx x xx xxxx xxxxxx xxxxx xxxxxx xxx xx xxxx xxx xxx xx x xxxxx"
+          text run at (14,42) width 732: "xxxxxxxxxxxx xxxxxxxx xxx xxxx xxxxx xx xxx xxxx xxxx xxxxx xxxxxx"
+          text run at (14,70) width 714: "xxx xx xxxx xxx xxx xx xxxxxx xxxxx xxxxxx xxx xx xxxx xxx xxx xx x"
+          text run at (14,98) width 360: "xxxxx xxxxxxxxxxxx xxxxxxxx xxx "
+selection is CARET:
+start:      position 233 of child 4 {TEXT} of root {DIV}
+upstream:   position 233 of child 4 {TEXT} of root {DIV}
+downstream: position 233 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/inserting/typing-003.html b/LayoutTests/editing/inserting/typing-003.html
new file mode 100644 (file)
index 0000000..8cd0422
--- /dev/null
@@ -0,0 +1,84 @@
+<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 typeWord(n) {
+    for (i = 0; i < n; i++)
+        typeCharacterCommand();
+    typeCharacterCommand(' ');
+}
+
+function editingTest() {
+    typeWord(4);
+    typeWord(1);
+    typeWord(2);
+    typeWord(4);
+    typeWord(6);
+    typeWord(5);
+    typeWord(6);
+    typeWord(3);
+    typeWord(2);
+    typeWord(4);
+    typeWord(3);
+    typeWord(3);
+    typeWord(2);
+    typeWord(1);
+    typeWord(5);
+    typeWord(12);
+    typeWord(8);
+    typeWord(3);
+    typeWord(4);
+    typeWord(5);
+    typeWord(2);
+    typeWord(3);
+    typeWord(4);
+    typeWord(4);
+    typeWord(5);
+    typeWord(6);
+    typeWord(3);
+    typeWord(2);
+    typeWord(4);
+    typeWord(3);
+    typeWord(3);
+    typeWord(2);
+    typeWord(6);
+    typeWord(5);
+    typeWord(6);
+    typeWord(3);
+    typeWord(2);
+    typeWord(4);
+    typeWord(3);
+    typeWord(3);
+    typeWord(2);
+    typeWord(1);
+    typeWord(5);
+    typeWord(12);
+    typeWord(8);
+    typeWord(3);
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index 622606961695887a8719815734a3eeb48211c5bf..7079498c9d691831a1797195fb4625947b89a0d9 100644 (file)
@@ -1,3 +1,20 @@
+2004-10-25  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+        
+        Added some more editing layout tests.
+
+        * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-001.html: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-002.html: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-003-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-003.html: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-004-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-ws-fixup-004.html: Added.
+        * layout-tests/editing/inserting/typing-003-expected.txt: Added.
+        * layout-tests/editing/inserting/typing-003.html: Added.
+
 2004-10-25  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John