Reviewed by Darin
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jan 2007 21:33:02 +0000 (21:33 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jan 2007 21:33:02 +0000 (21:33 +0000)
        - Tests for:
          <rdar://problem/4912002> REGRESSION: Series of words marked as a single misspelled word
          <rdar://problem/4462420> REGRESSION: Mail hangs during Replace All if the replacement string contains the search string

        * editing/spelling/spelling-expected.checksum: Added.
        * editing/spelling/spelling-expected.png: Added.
        * editing/spelling/spelling-expected.txt: Added.
        * editing/spelling/spelling.html: Added.
        * editing/execCommand/find-after-replace-expected.checksum: Added.
        * editing/execCommand/find-after-replace-expected.png: Added.
        * editing/execCommand/find-after-replace-expected.txt: Added.
        * editing/execCommand/find-after-replace.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/editing/execCommand/find-after-replace-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/find-after-replace-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/find-after-replace-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/find-after-replace.html [new file with mode: 0644]
LayoutTests/editing/spelling/spelling-expected.checksum [new file with mode: 0644]
LayoutTests/editing/spelling/spelling-expected.png [new file with mode: 0644]
LayoutTests/editing/spelling/spelling-expected.txt [new file with mode: 0644]
LayoutTests/editing/spelling/spelling.html [new file with mode: 0644]

index 08ab285dd3e9c27e89ed9b5df8a9bc0c1adc427f..afc6791c7a76b4adc96f14c388245a3fc32fde7c 100644 (file)
@@ -1,3 +1,44 @@
+2007-01-18  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Darin
+        
+        - Tests for:
+          <rdar://problem/4912002> REGRESSION: Series of words marked as a single misspelled word
+          <rdar://problem/4462420> REGRESSION: Mail hangs during Replace All if the replacement string contains the search string
+
+        * editing/spelling/spelling-expected.checksum: Added.
+        * editing/spelling/spelling-expected.png: Added.
+        * editing/spelling/spelling-expected.txt: Added.
+        * editing/spelling/spelling.html: Added.
+        * editing/execCommand/find-after-replace-expected.checksum: Added.
+        * editing/execCommand/find-after-replace-expected.png: Added.
+        * editing/execCommand/find-after-replace-expected.txt: Added.
+        * editing/execCommand/find-after-replace.html: Added.
+
+2007-01-18  David Kilzer  <ddkilzer@kilzer.net>
+
+        Reviewed by Darin and Mitz.
+
+        - Test for http://bugs.webkit.org/show_bug.cgi?id=12305
+          REGRESSION: Images do not load in video sections on CNN.com homepage
+
+        * fast/dom/HTMLImageElement/image-lowsrc-getset-expected.txt: Added.
+        * fast/dom/HTMLImageElement/image-lowsrc-getset.html: Added.
+
+2007-01-17  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by darin
+
+        <rdar://problem/4920488>
+        REGRESSION: A crash occurs at WebCore::Range::processContents () when removing formatting from selected text (that contains a link)
+
+        * editing/execCommand/4920488-expected.checksum: Added.
+        * editing/execCommand/4920488-expected.png: Added.
+        * editing/execCommand/4920488-expected.txt: Added.
+        * editing/execCommand/4920488.html: Added.
+        * fast/dom/Range/compareBoundaryPoints-1-expected.txt: Added.
+        * fast/dom/Range/compareBoundaryPoints-1.html: Added.
+
 2007-01-18  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by Darin and Mitz.
diff --git a/LayoutTests/editing/execCommand/find-after-replace-expected.checksum b/LayoutTests/editing/execCommand/find-after-replace-expected.checksum
new file mode 100644 (file)
index 0000000..2920c07
--- /dev/null
@@ -0,0 +1 @@
+5a0bfef92ff7528e42106cea8dde4577
\ No newline at end of file
diff --git a/LayoutTests/editing/execCommand/find-after-replace-expected.png b/LayoutTests/editing/execCommand/find-after-replace-expected.png
new file mode 100644 (file)
index 0000000..1786a9e
Binary files /dev/null and b/LayoutTests/editing/execCommand/find-after-replace-expected.png differ
diff --git a/LayoutTests/editing/execCommand/find-after-replace-expected.txt b/LayoutTests/editing/execCommand/find-after-replace-expected.txt
new file mode 100644 (file)
index 0000000..c45cadc
--- /dev/null
@@ -0,0 +1,33 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 5 of #text > BODY > HTML > #document to 5 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 4 of #text > BODY > HTML > #document to 5 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > BODY > HTML > #document to 0 of #text > BODY > HTML > #document toDOMRange:range from 3 of #text > BODY > HTML > #document to 3 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+layer at (0,0) size 800x600
+  RenderView 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 {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 784x36
+          text run at (0,0) width 329: "This tests find and replace inside an editable iframe. "
+          text run at (329,0) width 455: "You should see 'A B A B' below. With bug 4462420, you would see 'A"
+          text run at (0,18) width 49: "B B A'."
+      RenderBlock (anonymous) at (0,52) size 784x150
+        RenderPartObject {IFRAME} at (0,0) size 300x150
+          layer at (0,0) size 300x150
+            RenderView at (0,0) size 300x150
+          layer at (0,0) size 300x150
+            RenderBlock {HTML} at (0,0) size 300x150
+              RenderBody {BODY} at (8,8) size 284x134 [bgcolor=#FFFFE0]
+                RenderText {#text} at (0,0) size 31x18
+                  text run at (0,0) width 31: "A B "
+                RenderText {#text} at (31,0) size 27x18
+                  text run at (31,0) width 27: "A B"
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/editing/execCommand/find-after-replace.html b/LayoutTests/editing/execCommand/find-after-replace.html
new file mode 100644 (file)
index 0000000..273aa7d
--- /dev/null
@@ -0,0 +1,27 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests find and replace inside an editable iframe.  You should see 'A B A B' below. With bug 4462420, you would see 'A B B A'.</p>
+<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
+
+<script>
+function runTest() {
+    var frame = frames[0];
+    var sel = frame.getSelection();
+    var doc = frame.document;
+    
+    sel.setPosition(doc.body, 0);
+    doc.execCommand("InsertText", false, "A B A");
+    sel.setPosition(doc.body, 0);
+    doc.execCommand("FindString", false, "A B");
+    doc.execCommand("Copy");
+    doc.execCommand("FindString", false, "A");
+    doc.execCommand("Paste");
+    if (window.layoutTestController)
+        window.layoutTestController.notifyDone();
+}
+if (window.layoutTestController)
+    window.layoutTestController.waitUntilDone();
+window.setTimeout(runTest, 100);
+</script>
diff --git a/LayoutTests/editing/spelling/spelling-expected.checksum b/LayoutTests/editing/spelling/spelling-expected.checksum
new file mode 100644 (file)
index 0000000..92c4451
--- /dev/null
@@ -0,0 +1 @@
+23b41e28b74dbca1518ef549b5fc96eb
\ No newline at end of file
diff --git a/LayoutTests/editing/spelling/spelling-expected.png b/LayoutTests/editing/spelling/spelling-expected.png
new file mode 100644 (file)
index 0000000..c1f52c7
Binary files /dev/null and b/LayoutTests/editing/spelling/spelling-expected.png differ
diff --git a/LayoutTests/editing/spelling/spelling-expected.txt b/LayoutTests/editing/spelling/spelling-expected.txt
new file mode 100644 (file)
index 0000000..5e59ef9
--- /dev/null
@@ -0,0 +1,38 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+layer at (0,0) size 800x600
+  RenderView 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 768x18
+          text run at (0,0) width 768: "You should see 'a' on the first line below, and 'zz a' on the second line. 'zz' (and only 'zz') should be marked as misspelled."
+      RenderBlock {DIV} at (0,18) size 784x84 [border: (2px solid #FF0000)]
+        RenderBlock (anonymous) at (14,14) size 756x28
+          RenderInline {SPAN} at (0,0) size 11x28
+            RenderText {#text} at (0,0) size 11x28
+              text run at (0,0) width 11: "a"
+        RenderBlock {DIV} at (14,42) size 756x28
+          RenderInline {SPAN} at (0,0) size 39x28
+            RenderText {#text} at (0,0) size 39x28
+              text run at (0,0) width 39: "zz a"
+          RenderText {#text} at (0,0) size 0x0
+caret: position 3 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/spelling/spelling.html b/LayoutTests/editing/spelling/spelling.html
new file mode 100644 (file)
index 0000000..42a317f
--- /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() {
+    typeCharacterCommand('a');
+    insertParagraphCommand();
+    typeCharacterCommand('z');
+    typeCharacterCommand('z');
+    typeCharacterCommand(' ');
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div>You should see 'a' on the first line below, and 'zz a' on the second line. 'zz' (and only 'zz') should be marked as misspelled.</div>
+<div contenteditable id="root" class="editing">
+<span id="test">a</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>