Adding test cases for:
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jan 2006 15:11:01 +0000 (15:11 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jan 2006 15:11:01 +0000 (15:11 +0000)
        1) Arrowing up or down to an empty list item skipped the list item
        2) Deleting the content of a list item made it so you could never get the cursor inside the empty item

        * editing/selection/move-by-line-002-expected.png: Added.
        * editing/selection/move-by-line-002-expected.checksum: Added.
        * editing/selection/move-by-line-002-expected.txt: Added.
        * editing/selection/move-by-line-002.html: Added.
        * editing/deleting/delete-listitem-002-expected.checksum: Added.
        * editing/deleting/delete-listitem-002-expected.png: Added.
        * editing/deleting/delete-listitem-002-expected.txt: Added.
        * editing/deleting/delete-listitem-002.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-listitem-002-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/delete-listitem-002-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/delete-listitem-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-listitem-002.html [new file with mode: 0644]
LayoutTests/editing/selection/move-by-line-002-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/move-by-line-002-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/move-by-line-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/move-by-line-002.html [new file with mode: 0644]

index 384770740b819140b3206a7fd6ab1ba42d4c9c27..762ab403b2fb772353b2c545102755f04cbe0f41 100644 (file)
@@ -1,3 +1,18 @@
+2006-01-29  David Harrison  <harrison@apple.com>
+
+        Adding test cases for:
+        1) Arrowing up or down to an empty list item skipped the list item
+        2) Deleting the content of a list item made it so you could never get the cursor inside the empty item
+
+        * editing/selection/move-by-line-002-expected.png: Added.
+        * editing/selection/move-by-line-002-expected.checksum: Added.
+        * editing/selection/move-by-line-002-expected.txt: Added.
+        * editing/selection/move-by-line-002.html: Added.
+        * editing/deleting/delete-listitem-002-expected.checksum: Added.
+        * editing/deleting/delete-listitem-002-expected.png: Added.
+        * editing/deleting/delete-listitem-002-expected.txt: Added.
+        * editing/deleting/delete-listitem-002.html: Added.
+
 2006-01-29  Eric Seidel  <eseidel@apple.com>
 
         Reviewed by hyatt & darin.
diff --git a/LayoutTests/editing/deleting/delete-listitem-002-expected.checksum b/LayoutTests/editing/deleting/delete-listitem-002-expected.checksum
new file mode 100644 (file)
index 0000000..4aa91bc
--- /dev/null
@@ -0,0 +1 @@
+51080f434e679f3ba5e3eab926638ddd
\ No newline at end of file
diff --git a/LayoutTests/editing/deleting/delete-listitem-002-expected.png b/LayoutTests/editing/deleting/delete-listitem-002-expected.png
new file mode 100644 (file)
index 0000000..069a3d1
Binary files /dev/null and b/LayoutTests/editing/deleting/delete-listitem-002-expected.png differ
diff --git a/LayoutTests/editing/deleting/delete-listitem-002-expected.txt b/LayoutTests/editing/deleting/delete-listitem-002-expected.txt
new file mode 100644 (file)
index 0000000..711dda4
--- /dev/null
@@ -0,0 +1,50 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > LI > UL > DIV > BODY > HTML > #document to 4 of #text > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > LI > UL > DIV > BODY > HTML > #document to 4 of #text > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > LI > UL > DIV > BODY > HTML > #document to 3 of #text > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > LI > UL > DIV > BODY > HTML > #document to 3 of #text > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > LI > UL > DIV > BODY > HTML > #document to 2 of #text > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > LI > UL > DIV > BODY > HTML > #document to 2 of #text > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > LI > UL > DIV > BODY > HTML > #document to 1 of #text > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > LI > UL > DIV > BODY > HTML > #document to 1 of #text > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > UL > DIV > BODY > HTML > #document to 0 of LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+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 784x216 [border: (2px solid #FF0000)]
+        RenderBlock {UL} at (14,38) size 756x140
+          RenderListItem {LI} at (40,0) size 716x28
+            RenderListMarker at (0,0) size 0x22
+            RenderText {TEXT} at (0,0) size 35x28
+              text run at (0,0) width 35: "one"
+          RenderListItem {LI} at (40,28) size 716x28
+            RenderListMarker at (0,0) size 0x22
+            RenderText {TEXT} at (0,0) size 36x28
+              text run at (0,0) width 36: "two"
+          RenderListItem {LI} at (40,56) size 716x28
+            RenderListMarker at (0,0) size 0x22
+            RenderBR {BR} at (0,0) size 0x28
+          RenderListItem {LI} at (40,84) size 716x28
+            RenderListMarker at (0,0) size 0x22
+            RenderText {TEXT} at (0,0) size 40x28
+              text run at (0,0) width 40: "four"
+          RenderListItem {LI} at (40,112) size 716x28
+            RenderListMarker at (0,0) size 0x22
+            RenderText {TEXT} at (0,0) size 38x28
+              text run at (0,0) width 38: "five"
+caret: position 0 of child 0 {BR} of child 5 {LI} of child 1 {UL} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/delete-listitem-002.html b/LayoutTests/editing/deleting/delete-listitem-002.html
new file mode 100644 (file)
index 0000000..2b0e2e2
--- /dev/null
@@ -0,0 +1,44 @@
+<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++)
+        moveSelectionForwardByLineCommand();
+    for (i = 0; i < 5; i++)
+        moveSelectionForwardByCharacterCommand();
+    for (i = 0; i < 5; i++)
+       deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<ul id="test">
+<li>one</li>
+<li>two</li>
+<li>three</li>
+<li>four</li>
+<li>five</li>
+</ul>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/move-by-line-002-expected.checksum b/LayoutTests/editing/selection/move-by-line-002-expected.checksum
new file mode 100644 (file)
index 0000000..f767721
--- /dev/null
@@ -0,0 +1 @@
+22b60145c4ba4e179d1402e9bb5aee4e
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/move-by-line-002-expected.png b/LayoutTests/editing/selection/move-by-line-002-expected.png
new file mode 100644 (file)
index 0000000..d58c72f
Binary files /dev/null and b/LayoutTests/editing/selection/move-by-line-002-expected.png differ
diff --git a/LayoutTests/editing/selection/move-by-line-002-expected.txt b/LayoutTests/editing/selection/move-by-line-002-expected.txt
new file mode 100644 (file)
index 0000000..6be9d7b
--- /dev/null
@@ -0,0 +1,31 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+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 784x216 [border: (2px solid #FF0000)]
+        RenderBlock {DIV} at (14,38) size 756x140
+          RenderBlock {OL} at (0,0) size 756x140
+            RenderListItem {LI} at (40,0) size 716x28
+              RenderListMarker at (0,0) size 0x22
+              RenderText {TEXT} at (0,0) size 35x28
+                text run at (0,0) width 35: "one"
+            RenderListItem {LI} at (40,28) size 716x28
+              RenderListMarker at (0,0) size 0x22
+              RenderText {TEXT} at (0,0) size 36x28
+                text run at (0,0) width 36: "two"
+            RenderListItem {LI} at (40,56) size 716x28
+              RenderListMarker at (0,0) size 0x22
+              RenderBR {BR} at (0,0) size 0x28
+            RenderListItem {LI} at (40,84) size 716x28
+              RenderListMarker at (0,0) size 0x22
+              RenderText {TEXT} at (0,0) size 40x28
+                text run at (0,0) width 40: "four"
+            RenderListItem {LI} at (40,112) size 716x28
+              RenderListMarker at (0,0) size 0x22
+              RenderText {TEXT} at (0,0) size 38x28
+                text run at (0,0) width 38: "five"
+caret: position 0 of child 0 {BR} of child 2 {LI} of child 1 {OL} of child 1 {DIV} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/move-by-line-002.html b/LayoutTests/editing/selection/move-by-line-002.html
new file mode 100644 (file)
index 0000000..e4346be
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px; 
+}
+.cell { 
+    padding: 12px; 
+    font-size: 24px;
+    height: 48px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    for (i = 0; i < 2; i++)
+       moveSelectionForwardByLineCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<div id="test">
+<ol><li>one</li><li>two</li><li><br></li><li>four</li><li>five</li></ol>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>