diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index b58089d03c8b92986c2bd5ad14638fa67daaee36..59bbadcb89cdc41915e407b023a6e4f369155ba3 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 0000000000000000000000000000000000000000..187545c57129bed5588d4d8b0d888818c2621040 --- /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 0000000000000000000000000000000000000000..7d6b3ac04d67a8b301f010bde64fd45521e1b9dd --- /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 0000000000000000000000000000000000000000..950b6cae061d4c3baa55add857a625c288298dc8 --- /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 0000000000000000000000000000000000000000..0fd51eded6b62722e7e7c8c60f006888c2f198ad --- /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 0000000000000000000000000000000000000000..0694c4b5cf7843bffd953c5f4d74567b36042b73 --- /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 0000000000000000000000000000000000000000..25d6d60346549d45bf48ca6a5eae3408d456bd61 --- /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 0000000000000000000000000000000000000000..551cef0aa906624067a2fc9ee39297c044e5b435 --- /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 0000000000000000000000000000000000000000..8475d55d2bd68320c0869265fca83423d79c957c --- /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 65cde289ce2ad688a731cd5df6445b616ddaadff..b4144d23bbb19355766aefe09fa72a0d91cd0936 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