Changeset 147146 in webkit


Ignore:
Timestamp:
Mar 28, 2013 12:59:22 PM (11 years ago)
Author:
Claudio Saavedra
Message:

Prepare extend-selection-enclosing-block test to support different editing behavior
https://bugs.webkit.org/show_bug.cgi?id=113424

Reviewed by Ryosuke Niwa.

We make this test Mac specific and change
extendAndLogSelectionWithinBlock() to take the platform as a
parameter. When bug 110487 is fixed this should be extended to
test the Windows editing behavior.

  • editing/selection/extend-selection-enclosing-block-mac-expected.txt:

Renamed from
LayoutTests/editing/selection/extend-selection-enclosing-block-expected.txt.

  • editing/selection/extend-selection-enclosing-block-mac.html:

Renamed from
LayoutTests/editing/selection/extend-selection-enclosing-block.html.

  • editing/selection/resources/extend-selection.js:

(extendAndLogSelectionWithinBlock): Extend to receive platform as
a parameter. Only "mac" is supported for now.

Location:
trunk/LayoutTests
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147143 r147146  
     12013-03-28  Claudio Saavedra  <csaavedra@igalia.com>
     2
     3        Prepare extend-selection-enclosing-block test to support different editing behavior
     4        https://bugs.webkit.org/show_bug.cgi?id=113424
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        We make this test Mac specific and change
     9        extendAndLogSelectionWithinBlock() to take the platform as a
     10        parameter. When bug 110487 is fixed this should be extended to
     11        test the Windows editing behavior.
     12
     13        * editing/selection/extend-selection-enclosing-block-mac-expected.txt:
     14        Renamed from
     15        LayoutTests/editing/selection/extend-selection-enclosing-block-expected.txt.
     16        * editing/selection/extend-selection-enclosing-block-mac.html:
     17        Renamed from
     18        LayoutTests/editing/selection/extend-selection-enclosing-block.html.
     19        * editing/selection/resources/extend-selection.js:
     20        (extendAndLogSelectionWithinBlock): Extend to receive platform as
     21        a parameter. Only "mac" is supported for now.
     22
    1232013-03-28  Claudio Saavedra  <csaavedra@igalia.com>
    224
  • trunk/LayoutTests/editing/selection/extend-selection-enclosing-block-mac.html

    r147144 r147146  
    99<pre id="console"></pre>
    1010<script>
     11if (window.internals)
     12    internals.settings.setEditingBehavior("mac");
     13
    1114function runSelectionTestsWithGranularityForEnclosingBlock(testNodes, granularity)
    1215{
     
    1619        log("Test " + (i + 1) + ", LTR:\n");
    1720        log("  Extending right: ");
    18         extendAndLogSelectionWithinBlock("right", granularity);
     21        extendAndLogSelectionWithinBlock("right", granularity, "mac");
    1922
    2023        log("  Extending left:  ");
    21         extendAndLogSelectionWithinBlock("left", granularity);
     24        extendAndLogSelectionWithinBlock("left", granularity, "mac");
    2225    }
    2326}
  • trunk/LayoutTests/editing/selection/resources/extend-selection.js

    r120173 r147146  
    107107}
    108108
    109 function extendAndLogSelectionWithinBlock(direction, granularity)
    110 {
    111     return extendAndLogSelection(extendSelectionWithinBlock, direction, granularity);
     109function extendAndLogSelectionWithinBlock(direction, granularity, platform)
     110{
     111    return extendAndLogSelection({'mac': extendSelectionWithinBlock}[platform], direction, granularity);
    112112}
    113113
Note: See TracChangeset for help on using the changeset viewer.