Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2004 16:39:10 +0000 (16:39 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2004 16:39:10 +0000 (16:39 +0000)
        Added more editing layout tests.

        * layout-tests/editing/deleting/delete-tab-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-tab-001.html: Added.
        * layout-tests/editing/deleting/delete-tab-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-tab-002.html: Added.
        * layout-tests/editing/deleting/delete-tab-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-tab-003.html: Added.
        * layout-tests/editing/deleting/delete-tab-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-tab-004.html: Added.
        * layout-tests/editing/editing.js: Fixed a little bug in one of the "delayed" commands.
        * layout-tests/editing/inserting/insert-tab-001-expected.txt: Added.
        * layout-tests/editing/inserting/insert-tab-001.html: Added.
        * layout-tests/editing/inserting/insert-tab-002-expected.txt: Added.
        * layout-tests/editing/inserting/insert-tab-002.html: Added.
        * layout-tests/editing/inserting/insert-tab-003-expected.txt: Added.
        * layout-tests/editing/inserting/insert-tab-003.html: Added.
        * layout-tests/editing/inserting/insert-tab-004-expected.txt: Added.
        * layout-tests/editing/inserting/insert-tab-004.html: Added.

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

18 files changed:
LayoutTests/editing/deleting/delete-tab-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-001.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-002.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-003.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-tab-004.html [new file with mode: 0644]
LayoutTests/editing/editing.js
LayoutTests/editing/inserting/insert-tab-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-001.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-002.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-003.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-tab-004.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/deleting/delete-tab-001-expected.txt b/LayoutTests/editing/deleting/delete-tab-001-expected.txt
new file mode 100644 (file)
index 0000000..01c6cce
--- /dev/null
@@ -0,0 +1,14 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "    foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream:   position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-tab-001.html b/LayoutTests/editing/deleting/delete-tab-001.html
new file mode 100644 (file)
index 0000000..b70368a
--- /dev/null
@@ -0,0 +1,36 @@
+<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() {
+    typeCharacterCommand('\t');
+    typeCharacterCommand('\t');
+    for (i = 0; i < 4; i++)
+        deleteCommand();
+}
+
+</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/deleting/delete-tab-002-expected.txt b/LayoutTests/editing/deleting/delete-tab-002-expected.txt
new file mode 100644 (file)
index 0000000..c35ba45
--- /dev/null
@@ -0,0 +1,13 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "foo    "
+selection is CARET:
+start:      position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-tab-002.html b/LayoutTests/editing/deleting/delete-tab-002.html
new file mode 100644 (file)
index 0000000..c5720ef
--- /dev/null
@@ -0,0 +1,38 @@
+<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();
+    typeCharacterCommand('\t');
+    typeCharacterCommand('\t');
+    for (i = 0; i < 4; i++)
+        deleteCommand();
+}
+
+</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/deleting/delete-tab-003-expected.txt b/LayoutTests/editing/deleting/delete-tab-003-expected.txt
new file mode 100644 (file)
index 0000000..6308092
--- /dev/null
@@ -0,0 +1,14 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "fo    o"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-tab-003.html b/LayoutTests/editing/deleting/delete-tab-003.html
new file mode 100644 (file)
index 0000000..fc40a5a
--- /dev/null
@@ -0,0 +1,38 @@
+<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 < 2; i++)
+        moveSelectionForwardByCharacterCommand();
+    typeCharacterCommand('\t');
+    typeCharacterCommand('\t');
+    for (i = 0; i < 4; i++)
+        deleteCommand();
+}
+
+</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/deleting/delete-tab-004-expected.txt b/LayoutTests/editing/deleting/delete-tab-004-expected.txt
new file mode 100644 (file)
index 0000000..fd45c3b
--- /dev/null
@@ -0,0 +1,15 @@
+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 56x56
+          RenderBR {BR} at (14,14) size 0x28
+          RenderText {TEXT} at (14,42) size 56x28
+            text run at (14,42) width 56: "    foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream:   position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-tab-004.html b/LayoutTests/editing/deleting/delete-tab-004.html
new file mode 100644 (file)
index 0000000..916de4d
--- /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() {
+    insertNewlineCommand();
+    typeCharacterCommand('\t');
+    typeCharacterCommand('\t');
+    for (i = 0; i < 4; i++)
+        deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index d895d88..ede0c58 100644 (file)
@@ -183,7 +183,7 @@ function execTypeCharacterCommand(c) {
 }
 function typeCharacterCommand(c) {
     if (commandDelay > 0) {
-        window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay);
+        window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay, c);
         commandCount++;
     }
     else {
diff --git a/LayoutTests/editing/inserting/insert-tab-001-expected.txt b/LayoutTests/editing/inserting/insert-tab-001-expected.txt
new file mode 100644 (file)
index 0000000..01c6cce
--- /dev/null
@@ -0,0 +1,14 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "    foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream:   position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-tab-001.html b/LayoutTests/editing/inserting/insert-tab-001.html
new file mode 100644 (file)
index 0000000..b0a9004
--- /dev/null
@@ -0,0 +1,33 @@
+<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() {
+    typeCharacterCommand('\t');
+}
+
+</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-tab-002-expected.txt b/LayoutTests/editing/inserting/insert-tab-002-expected.txt
new file mode 100644 (file)
index 0000000..c35ba45
--- /dev/null
@@ -0,0 +1,13 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "foo    "
+selection is CARET:
+start:      position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-tab-002.html b/LayoutTests/editing/inserting/insert-tab-002.html
new file mode 100644 (file)
index 0000000..814bee2
--- /dev/null
@@ -0,0 +1,35 @@
+<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();
+    typeCharacterCommand('\t');
+}
+
+</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-tab-003-expected.txt b/LayoutTests/editing/inserting/insert-tab-003-expected.txt
new file mode 100644 (file)
index 0000000..6308092
--- /dev/null
@@ -0,0 +1,14 @@
+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 56x28
+          RenderText {TEXT} at (14,14) size 56x28
+            text run at (14,14) width 56: "fo    o"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-tab-003.html b/LayoutTests/editing/inserting/insert-tab-003.html
new file mode 100644 (file)
index 0000000..fca4585
--- /dev/null
@@ -0,0 +1,35 @@
+<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 < 2; i++)
+        moveSelectionForwardByCharacterCommand();
+    typeCharacterCommand('\t');
+}
+
+</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-tab-004-expected.txt b/LayoutTests/editing/inserting/insert-tab-004-expected.txt
new file mode 100644 (file)
index 0000000..fd45c3b
--- /dev/null
@@ -0,0 +1,15 @@
+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 56x56
+          RenderBR {BR} at (14,14) size 0x28
+          RenderText {TEXT} at (14,42) size 56x28
+            text run at (14,42) width 56: "    foo"
+        RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start:      position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream:   position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
diff --git a/LayoutTests/editing/inserting/insert-tab-004.html b/LayoutTests/editing/inserting/insert-tab-004.html
new file mode 100644 (file)
index 0000000..53eff5b
--- /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('\t');
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index c7a704c..52be769 100644 (file)
@@ -1,5 +1,29 @@
 2004-08-31  Ken Kocienda  <kocienda@apple.com>
 
+        Reviewed by me
+        
+        Added more editing layout tests.
+
+        * layout-tests/editing/deleting/delete-tab-001-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-tab-001.html: Added.
+        * layout-tests/editing/deleting/delete-tab-002-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-tab-002.html: Added.
+        * layout-tests/editing/deleting/delete-tab-003-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-tab-003.html: Added.
+        * layout-tests/editing/deleting/delete-tab-004-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-tab-004.html: Added.
+        * layout-tests/editing/editing.js: Fixed a little bug in one of the "delayed" commands.
+        * layout-tests/editing/inserting/insert-tab-001-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-tab-001.html: Added.
+        * layout-tests/editing/inserting/insert-tab-002-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-tab-002.html: Added.
+        * layout-tests/editing/inserting/insert-tab-003-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-tab-003.html: Added.
+        * layout-tests/editing/inserting/insert-tab-004-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-tab-004.html: Added.
+
+2004-08-31  Ken Kocienda  <kocienda@apple.com>
+
         Reviewed by John
 
         Fix for this bug: