From b267f90b87a898cb8e222333fd14fdfff3af2f22 Mon Sep 17 00:00:00 2001 From: justing Date: Tue, 3 Jan 2006 12:37:06 +0000 Subject: [PATCH] New/updated layout tests for: Bug with baseOffset and extentOffset in selections (for writely.com) selection object incorrect after double-clicking a word * editing/selection/anchor-focus1-expected.txt: Added. * editing/selection/anchor-focus1.html: Added. * editing/selection/anchor-focus2-expected.txt: Added. * editing/selection/anchor-focus2.html: Added. * editing/selection/anchor-focus3-expected.txt: Added. * editing/selection/anchor-focus3.html: Added. * editing/selection/getRangeAt-expected.txt: Added. * editing/selection/getRangeAt.html: Added. * editing/selection/unrendered-001-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11858 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 18 ++++ .../selection/anchor-focus1-expected.txt | 10 +++ .../editing/selection/anchor-focus1.html | 79 ++++++++++++++++++ .../selection/anchor-focus2-expected.txt | 11 +++ .../editing/selection/anchor-focus2.html | 83 +++++++++++++++++++ .../selection/anchor-focus3-expected.txt | 11 +++ .../editing/selection/anchor-focus3.html | 81 ++++++++++++++++++ .../editing/selection/getRangeAt-expected.txt | 8 ++ LayoutTests/editing/selection/getRangeAt.html | 38 +++++++++ .../selection/unrendered-001-expected.txt | 2 +- 10 files changed, 340 insertions(+), 1 deletion(-) create mode 100644 LayoutTests/editing/selection/anchor-focus1-expected.txt create mode 100644 LayoutTests/editing/selection/anchor-focus1.html create mode 100644 LayoutTests/editing/selection/anchor-focus2-expected.txt create mode 100644 LayoutTests/editing/selection/anchor-focus2.html create mode 100644 LayoutTests/editing/selection/anchor-focus3-expected.txt create mode 100644 LayoutTests/editing/selection/anchor-focus3.html create mode 100644 LayoutTests/editing/selection/getRangeAt-expected.txt create mode 100644 LayoutTests/editing/selection/getRangeAt.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index b58089d03c8..59bbadcb89c 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,21 @@ +2006-01-03 Justin Garcia + + New/updated layout tests for: + + Bug with baseOffset and extentOffset in selections (for writely.com) + + selection object incorrect after double-clicking a word + + * editing/selection/anchor-focus1-expected.txt: Added. + * editing/selection/anchor-focus1.html: Added. + * editing/selection/anchor-focus2-expected.txt: Added. + * editing/selection/anchor-focus2.html: Added. + * editing/selection/anchor-focus3-expected.txt: Added. + * editing/selection/anchor-focus3.html: Added. + * editing/selection/getRangeAt-expected.txt: Added. + * editing/selection/getRangeAt.html: Added. + * editing/selection/unrendered-001-expected.txt: + 2006-01-03 Anders Carlsson Reviewed by Maciej. diff --git a/LayoutTests/editing/selection/anchor-focus1-expected.txt b/LayoutTests/editing/selection/anchor-focus1-expected.txt new file mode 100644 index 00000000000..187545c5712 --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus1-expected.txt @@ -0,0 +1,10 @@ +EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers. + +text +Anchor ([object Text], 0) is correct. +Focus ([object Text], 4) is correct. + diff --git a/LayoutTests/editing/selection/anchor-focus1.html b/LayoutTests/editing/selection/anchor-focus1.html new file mode 100644 index 00000000000..7d6b3ac04d6 --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus1.html @@ -0,0 +1,79 @@ + + + + + +

This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers.

+ +
text
+
    + + + diff --git a/LayoutTests/editing/selection/anchor-focus2-expected.txt b/LayoutTests/editing/selection/anchor-focus2-expected.txt new file mode 100644 index 00000000000..950b6cae061 --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus2-expected.txt @@ -0,0 +1,11 @@ +EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +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 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers. + +text +Anchor ([object Text], 0) is correct. +Focus ([object Text], 4) is correct. + diff --git a/LayoutTests/editing/selection/anchor-focus2.html b/LayoutTests/editing/selection/anchor-focus2.html new file mode 100644 index 00000000000..0fd51eded6b --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus2.html @@ -0,0 +1,83 @@ + + + + + +

    This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers.

    + +
    text
    +
      + + + + diff --git a/LayoutTests/editing/selection/anchor-focus3-expected.txt b/LayoutTests/editing/selection/anchor-focus3-expected.txt new file mode 100644 index 00000000000..0694c4b5cf7 --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus3-expected.txt @@ -0,0 +1,11 @@ +EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers. + +text +Anchor ([object Text], 4) is correct. +Focus ([object Text], 0) is correct. + diff --git a/LayoutTests/editing/selection/anchor-focus3.html b/LayoutTests/editing/selection/anchor-focus3.html new file mode 100644 index 00000000000..25d6d603465 --- /dev/null +++ b/LayoutTests/editing/selection/anchor-focus3.html @@ -0,0 +1,81 @@ + + + + + +

      This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers.

      + +
      text
      +
        + + + diff --git a/LayoutTests/editing/selection/getRangeAt-expected.txt b/LayoutTests/editing/selection/getRangeAt-expected.txt new file mode 100644 index 00000000000..551cef0aa90 --- /dev/null +++ b/LayoutTests/editing/selection/getRangeAt-expected.txt @@ -0,0 +1,8 @@ +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +This tests that Selection::getRangeAt(int) returns a valid Range object. + +hello +[object Range] +[object Text] +[object Text] + diff --git a/LayoutTests/editing/selection/getRangeAt.html b/LayoutTests/editing/selection/getRangeAt.html new file mode 100644 index 00000000000..8475d55d2bd --- /dev/null +++ b/LayoutTests/editing/selection/getRangeAt.html @@ -0,0 +1,38 @@ + + + +

        This tests that Selection::getRangeAt(int) returns a valid Range object.

        +
        hello
        +
          + + \ No newline at end of file diff --git a/LayoutTests/editing/selection/unrendered-001-expected.txt b/LayoutTests/editing/selection/unrendered-001-expected.txt index 65cde289ce2..b4144d23bbb 100644 --- a/LayoutTests/editing/selection/unrendered-001-expected.txt +++ b/LayoutTests/editing/selection/unrendered-001-expected.txt @@ -10,4 +10,4 @@ layer at (0,0) size 820x600 text run at (74,84) width 32: "foo" RenderText {TEXT} at (106,84) size 40x48 text run at (106,84) width 40: " baz" -caret: position 0 of child 3 {TEXT} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document +caret: position 3 of child 0 {TEXT} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document -- GitLab