Add layout test for <rdar://problem/4110366>.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2005 19:01:19 +0000 (19:01 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2005 19:01:19 +0000 (19:01 +0000)
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011.html: Added.

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

LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt b/LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt
new file mode 100644 (file)
index 0000000..7dde67c
--- /dev/null
@@ -0,0 +1,34 @@
+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 784x240 [border: (2px solid #0000FF)]
+        RenderBlock {DIV} at (14,14) size 756x84
+          RenderText {TEXT} at (0,0) size 67x28
+            text run at (0,0) width 67: "Tests: "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,28) size 631x28
+            text run at (0,28) width 631: "Delete at the end of document when there is a BR following a P. "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,56) size 442x28
+            text run at (0,56) width 442: "This is a test case for rdar://problem/4110366"
+        RenderBlock {DIV} at (14,114) size 756x112
+          RenderText {TEXT} at (0,0) size 189x28
+            text run at (0,0) width 189: "Expected Results: "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,28) size 720x56
+            text run at (0,28) width 240: "Red box with four lines. "
+            text run at (240,28) width 480: "The second line is a nested red box with the word"
+            text run at (0,56) width 81: "\"hello\". "
+            text run at (81,56) width 316: "The other three lines are empty. "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,84) size 468x28
+            text run at (0,84) width 468: "Selection is a caret at the start of the fourth line."
+      RenderBlock {DIV} at (0,264) size 784x112 [border: (2px solid #FF0000)]
+        RenderBlock {P} at (2,26) size 780x32 [border: (2px solid #FF0000)]
+          RenderText {TEXT} at (2,2) size 49x28
+            text run at (2,2) width 49: "hello"
+        RenderBlock (anonymous) at (2,82) size 780x28
+          RenderBR {BR} at (0,0) size 0x28
+caret: position 0 of child 1 {BR} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011.html b/LayoutTests/editing/deleting/delete-at-paragraph-boundaries-011.html
new file mode 100644 (file)
index 0000000..ad28929
--- /dev/null
@@ -0,0 +1,52 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    font-size: 24px; 
+}
+.explanation { 
+    border: 2px solid blue; 
+    padding: 12px; 
+    font-size: 24px; 
+    margin-bottom: 24px;
+}
+.scenario { margin-bottom: 16px;}
+.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
+.expected-results:first-line { font-weight: bold }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    moveSelectionForwardByLineCommand();
+    extendSelectionForwardByLineCommand();
+    extendSelectionForwardByLineCommand();
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests: 
+<br>
+Delete at the end of document when there is a BR following a P.
+<br>
+This is a test case for rdar://problem/4110366
+</div>
+<div class="expected-results">
+Expected Results:
+<br>
+Red box with four lines.  The second line is a nested red box with the word "hello".  The other three lines are empty.
+<br>
+Selection is a caret at the start of the fourth line.
+</div>
+</div>
+<div contenteditable id="root" class="editing"><p id="test" class="editing">hello</p><p class="editing"><br></p><br></div><script>runEditingTest();</script></body></html>
\ No newline at end of file
index 29d272895a2e5caa125218c0963ecce0cf902163..cd9914dba33dd84a5765252ef40cb0ed4004430c 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-09  David Harrison  <harrison@apple.com>
+
+        Add layout test for <rdar://problem/4110366>.
+
+        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011.html: Added.
+
 2005-05-09  Darin Adler  <darin@apple.com>
 
         - checked in a result for the Flash replacement test that Dave added