Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 18:04:58 +0000 (18:04 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 18:04:58 +0000 (18:04 +0000)
        Added a layout test based on my last checkin.

        * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
        * layout-tests/editing/selection/move-by-word-001.html: Added.

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

LayoutTests/editing/selection/move-by-word-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/move-by-word-001.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/selection/move-by-word-001-expected.txt b/LayoutTests/editing/selection/move-by-word-001-expected.txt
new file mode 100644 (file)
index 0000000..45e3699
--- /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 784x84 [border: (2px solid #FF0000)]
+        RenderBlock {DIV} at (14,14) size 756x28
+          RenderText {TEXT} at (0,0) size 32x28
+            text run at (0,0) width 32: "foo"
+        RenderBlock (anonymous) at (14,42) size 756x28
+          RenderText {TEXT} at (0,0) size 31x28
+            text run at (0,0) width 31: "bar"
+selection is RANGE:
+start:      position 0 of child 3 {TEXT} of root {DIV}
+upstream:   position 0 of child 3 {TEXT} of root {DIV}
+downstream: position 0 of child 3 {TEXT} of root {DIV}
+end:        position 3 of child 3 {TEXT} of root {DIV}
+upstream:   position 3 of child 3 {TEXT} of root {DIV}
+downstream: position 4 of child 3 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/move-by-word-001.html b/LayoutTests/editing/selection/move-by-word-001.html
new file mode 100644 (file)
index 0000000..49348fc
--- /dev/null
@@ -0,0 +1,45 @@
+<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 < 6; i++)
+        moveSelectionForwardByWordCommand();    
+    extendSelectionBackwardByWordCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<div id="test">foo</div>bar
+</div>
+
+<!-- 
+    Specifically checks test case in bug:
+    <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps
+-->
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
index 75e163694bd5814bad06c57fbc590554ae87f4e0..c9b259cee13212e02726f48bacfe6479f7e91951 100644 (file)
@@ -1,3 +1,12 @@
+2004-12-16  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+        
+        Added a layout test based on my last checkin.
+
+        * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
+        * layout-tests/editing/selection/move-by-word-001.html: Added.
+
 2004-12-16  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John