Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2004 18:38:56 +0000 (18:38 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2004 18:38:56 +0000 (18:38 +0000)
        New layout tests.

        * layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-001.html: Added.
        * layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-002.html: Added.
        * layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-003.html: Added.
        * layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-004.html: Added.
        * layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-005.html: Added.
        * layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-006.html: Added.
        * layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-007.html: Added.
        * layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-008.html: Added.
        * layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-009.html: Added.

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

19 files changed:
LayoutTests/editing/inserting/insert-div-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-001.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-002.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-003.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-004.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-005-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-005.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-006-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-006.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-007-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-007.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-008-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-008.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-009-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-009.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/inserting/insert-div-001-expected.txt b/LayoutTests/editing/inserting/insert-div-001-expected.txt
new file mode 100644 (file)
index 0000000..8856fb6
--- /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 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "test"
+      RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 12x28
+          text run at (14,14) width 12: "x"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-001.html b/LayoutTests/editing/inserting/insert-div-001.html
new file mode 100644 (file)
index 0000000..e596b19
--- /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() {
+    selectAllCommand();
+    moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-002-expected.txt b/LayoutTests/editing/inserting/insert-div-002-expected.txt
new file mode 100644 (file)
index 0000000..8856fb6
--- /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 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "test"
+      RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 12x28
+          text run at (14,14) width 12: "x"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-002.html b/LayoutTests/editing/inserting/insert-div-002.html
new file mode 100644 (file)
index 0000000..d052976
--- /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() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-003-expected.txt b/LayoutTests/editing/inserting/insert-div-003-expected.txt
new file mode 100644 (file)
index 0000000..f467cf7
--- /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 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "test"
+      RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 46x28
+          text run at (14,14) width 46: "xtest"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-003.html b/LayoutTests/editing/inserting/insert-div-003.html
new file mode 100644 (file)
index 0000000..3bb6031
--- /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() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">testtest</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-004-expected.txt b/LayoutTests/editing/inserting/insert-div-004-expected.txt
new file mode 100644 (file)
index 0000000..4a01910
--- /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)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "test"
+      RenderBlock {DIV} at (0,56) size 784x28 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (0,84) size 784x28 [border: (2px solid #FF0000)]
+selection is CARET:
+start:      position 0 of child 3 {DIV} of root {BODY}
+upstream:   position 0 of child 3 {DIV} of root {BODY}
+downstream: position 1 of child 3 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-004.html b/LayoutTests/editing/inserting/insert-div-004.html
new file mode 100644 (file)
index 0000000..c5b3615
--- /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() {
+    for (i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-005-expected.txt b/LayoutTests/editing/inserting/insert-div-005-expected.txt
new file mode 100644 (file)
index 0000000..1d06357
--- /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)]
+        RenderText {TEXT} at (14,14) size 34x28
+          text run at (14,14) width 34: "test"
+      RenderBlock {DIV} at (0,56) size 784x28 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (0,84) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 12x28
+          text run at (14,14) width 12: "x"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 3 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-005.html b/LayoutTests/editing/inserting/insert-div-005.html
new file mode 100644 (file)
index 0000000..f9c8437
--- /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 < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-006-expected.txt b/LayoutTests/editing/inserting/insert-div-006-expected.txt
new file mode 100644 (file)
index 0000000..ddeb6ca
--- /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 784x28 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (0,28) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 46x28
+          text run at (14,14) width 46: "xtest"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-006.html b/LayoutTests/editing/inserting/insert-div-006.html
new file mode 100644 (file)
index 0000000..374950b
--- /dev/null
@@ -0,0 +1,32 @@
+<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() {
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">test</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-007-expected.txt b/LayoutTests/editing/inserting/insert-div-007-expected.txt
new file mode 100644 (file)
index 0000000..6f3a5ce
--- /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 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 32x28
+          text run at (14,14) width 32: "foo"
+      RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 37x28
+          text run at (14,14) width 37: " bar"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-007.html b/LayoutTests/editing/inserting/insert-div-007.html
new file mode 100644 (file)
index 0000000..20b2c61
--- /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() {
+    for (i = 0; i < 3; i++)
+        moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">foo bar</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-008-expected.txt b/LayoutTests/editing/inserting/insert-div-008-expected.txt
new file mode 100644 (file)
index 0000000..43c87fc
--- /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 784x28 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (0,28) size 784x56 [border: (2px solid #FF0000)]
+        RenderText {TEXT} at (14,14) size 44x28
+          text run at (14,14) width 44: "xfoo"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-008.html b/LayoutTests/editing/inserting/insert-div-008.html
new file mode 100644 (file)
index 0000000..696cdaa
--- /dev/null
@@ -0,0 +1,32 @@
+<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() {
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root" >
+<div class="editing" id="test">foo</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/inserting/insert-div-009-expected.txt b/LayoutTests/editing/inserting/insert-div-009-expected.txt
new file mode 100644 (file)
index 0000000..56aefdd
--- /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 784x18
+        RenderText {TEXT} at (0,0) size 21x18
+          text run at (0,0) width 21: "test"
+      RenderBlock {DIV} at (0,18) size 784x18
+        RenderText {TEXT} at (0,0) size 8x18
+          text run at (0,0) width 8: "x"
+selection is CARET:
+start:      position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+upstream:   position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 2 {DIV} of root {BODY}
diff --git a/LayoutTests/editing/inserting/insert-div-009.html b/LayoutTests/editing/inserting/insert-div-009.html
new file mode 100644 (file)
index 0000000..0f5feca
--- /dev/null
@@ -0,0 +1,31 @@
+<html> 
+<head>
+
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    selectAllCommand();
+    moveSelectionForwardByCharacterCommand();
+    insertParagraphCommand();
+    typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+<div id="test">test</div>
+
+<!-- This test is very similar to other insert-div tests, except that it does not place a height (using CSS) on
+     blocks that are added. Bugs involving "block placeholders" (br elements added to give a block height)
+     will be exposed in this test but not others. -->
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index 5f6224a..a235e21 100644 (file)
@@ -1,5 +1,30 @@
 2004-12-06  Ken Kocienda  <kocienda@apple.com>
 
+        Reviewed by me
+        
+        New layout tests.
+
+        * layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-001.html: Added.
+        * layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-002.html: Added.
+        * layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-003.html: Added.
+        * layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-004.html: Added.
+        * layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-005.html: Added.
+        * layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-006.html: Added.
+        * layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-007.html: Added.
+        * layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-008.html: Added.
+        * layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
+        * layout-tests/editing/inserting/insert-div-009.html: Added.
+
+2004-12-06  Ken Kocienda  <kocienda@apple.com>
+
         Reviewed by Harrison
 
         Fix for this bug: