Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2004 15:27:18 +0000 (15:27 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2004 15:27:18 +0000 (15:27 +0000)
        Added more editing layout tests. Renamed some others.

        * layout-tests/editing/inserting/insert-br-001-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-001.html: Added.
        * layout-tests/editing/inserting/insert-br-002-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-002.html: Added.
        * layout-tests/editing/inserting/insert-br-003-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-003.html: Added.
        * layout-tests/editing/inserting/insert-br-004-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-004.html: Added.
        * layout-tests/editing/inserting/insert-br-005-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-005.html: Added.
        * layout-tests/editing/inserting/insert-br-006-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-006.html: Added.
        * layout-tests/editing/inserting/insert-br-case1-expected.txt: Removed.
        * layout-tests/editing/inserting/insert-br-case1.html: Removed.
        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Removed.
        * layout-tests/editing/inserting/insert-br-case2.html: Removed.
        * layout-tests/editing/inserting/insert-br-case3-expected.txt: Removed.
        * layout-tests/editing/inserting/insert-br-case3.html: Removed.
        * layout-tests/editing/inserting/insert-br-case6-expected.txt: Removed.
        * layout-tests/editing/inserting/insert-br-case6.html: Removed.
        * layout-tests/editing/inserting/insert-text-with-newlines-expected.txt: Added.
        * layout-tests/editing/inserting/insert-text-with-newlines.html: Added.

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

15 files changed:
LayoutTests/editing/inserting/insert-br-001-expected.txt [moved from LayoutTests/editing/inserting/insert-br-case1-expected.txt with 100% similarity]
LayoutTests/editing/inserting/insert-br-001.html [moved from LayoutTests/editing/inserting/insert-br-case1.html with 100% similarity]
LayoutTests/editing/inserting/insert-br-002-expected.txt [moved from LayoutTests/editing/inserting/insert-br-case2-expected.txt with 100% similarity]
LayoutTests/editing/inserting/insert-br-002.html [moved from LayoutTests/editing/inserting/insert-br-case2.html with 100% similarity]
LayoutTests/editing/inserting/insert-br-003-expected.txt [moved from LayoutTests/editing/inserting/insert-br-case3-expected.txt with 100% similarity]
LayoutTests/editing/inserting/insert-br-003.html [moved from LayoutTests/editing/inserting/insert-br-case3.html with 100% similarity]
LayoutTests/editing/inserting/insert-br-004-expected.txt [moved from LayoutTests/editing/inserting/insert-br-case6-expected.txt with 100% similarity]
LayoutTests/editing/inserting/insert-br-004.html [moved from LayoutTests/editing/inserting/insert-br-case6.html with 100% similarity]
LayoutTests/editing/inserting/insert-br-005-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-005.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-006-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-br-006.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-text-with-newlines-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-text-with-newlines.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/inserting/insert-br-005-expected.txt b/LayoutTests/editing/inserting/insert-br-005-expected.txt
new file mode 100644 (file)
index 0000000..b974b77
--- /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 784x112 [border: (2px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x84
+          RenderText {TEXT} at (14,14) size 32x28
+            text run at (14,14) width 32: "foo"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderBR {BR} at (14,42) size 0x28
+          RenderText {TEXT} at (14,70) size 12x28
+            text run at (14,70) width 12: "x"
+          RenderBR {BR} at (14,70) size 0x28
+selection is CARET:
+start:      position 1 of child 4 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 1 of child 4 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 5 {BR} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-br-005.html b/LayoutTests/editing/inserting/insert-br-005.html
new file mode 100644 (file)
index 0000000..56d784f
--- /dev/null
@@ -0,0 +1,37 @@
+<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();
+    insertNewlineCommand();
+    insertNewlineCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-br-006-expected.txt b/LayoutTests/editing/inserting/insert-br-006-expected.txt
new file mode 100644 (file)
index 0000000..cd3467f
--- /dev/null
@@ -0,0 +1,16 @@
+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 44x28
+          RenderText {TEXT} at (14,14) size 44x28
+            text run at (14,14) width 44: "xfoo"
+        RenderText {TEXT} at (58,14) size 6x28
+          text run at (58,14) width 6: " "
+        RenderBR {BR} at (0,0) size 0x0
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream:   position 1 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 1 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-br-006.html b/LayoutTests/editing/inserting/insert-br-006.html
new file mode 100644 (file)
index 0000000..9d6577e
--- /dev/null
@@ -0,0 +1,34 @@
+<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() {
+    insertNewlineCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-text-with-newlines-expected.txt b/LayoutTests/editing/inserting/insert-text-with-newlines-expected.txt
new file mode 100644 (file)
index 0000000..d4d72ca
--- /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 784x584
+      RenderBlock {DIV} at (0,0) size 784x140 [border: (2px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 79x112
+          RenderText {TEXT} at (14,14) size 79x28
+            text run at (14,14) width 79: "Foo xxx"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderInline {I} at (0,0) size 33x28
+            RenderText {TEXT} at (14,42) size 33x28
+              text run at (14,42) width 33: "bar"
+          RenderText {TEXT} at (47,42) size 42x28
+            text run at (47,42) width 42: " xxx"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderBR {BR} at (14,70) size 0x28
+          RenderText {TEXT} at (14,98) size 76x28
+            text run at (14,98) width 76: " bazxxx"
+selection is CARET:
+start:      position 7 of child 7 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 7 of child 7 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 7 of child 7 {TEXT} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-text-with-newlines.html b/LayoutTests/editing/inserting/insert-text-with-newlines.html
new file mode 100644 (file)
index 0000000..fbed7e3
--- /dev/null
@@ -0,0 +1,49 @@
+<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 moveNSpacesAndType(n) {
+    for (i = 0; i < n; i++) {
+        moveSelectionForwardByCharacterCommand();
+    }
+    for (i = 0; i < 3; i++) {
+        typeCharacterCommand();
+    }
+}
+
+function editingTest() {
+    moveNSpacesAndType(4);
+    insertNewlineCommand();
+    moveNSpacesAndType(4);
+    insertNewlineCommand();
+    insertNewlineCommand();
+    moveNSpacesAndType(4);
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">Foo    <i>  bar</i>
+
+baz</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index 05cafe4..704db2a 100644 (file)
@@ -1,6 +1,35 @@
 2004-08-31  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by me
+        
+        Added more editing layout tests. Renamed some others.
+
+        * layout-tests/editing/inserting/insert-br-001-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-001.html: Added.
+        * layout-tests/editing/inserting/insert-br-002-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-002.html: Added.
+        * layout-tests/editing/inserting/insert-br-003-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-003.html: Added.
+        * layout-tests/editing/inserting/insert-br-004-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-004.html: Added.
+        * layout-tests/editing/inserting/insert-br-005-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-005.html: Added.
+        * layout-tests/editing/inserting/insert-br-006-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-br-006.html: Added.
+        * layout-tests/editing/inserting/insert-br-case1-expected.txt: Removed.
+        * layout-tests/editing/inserting/insert-br-case1.html: Removed.
+        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Removed.
+        * layout-tests/editing/inserting/insert-br-case2.html: Removed.
+        * layout-tests/editing/inserting/insert-br-case3-expected.txt: Removed.
+        * layout-tests/editing/inserting/insert-br-case3.html: Removed.
+        * layout-tests/editing/inserting/insert-br-case6-expected.txt: Removed.
+        * layout-tests/editing/inserting/insert-br-case6.html: Removed.
+        * layout-tests/editing/inserting/insert-text-with-newlines-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-text-with-newlines.html: Added.
+
+2004-08-31  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
 
         * layout-tests/editing/editing.js: Modified typeCharacterCommand so it can accept a character
         as an argument.